mariadb/cmake/sign.cmake.in
Vladislav Vaintroub a46679dcf7 Build improvements and cleanups.
- the probably ultimate fix for dependencies on VS
- remove some GET_TARGET_PROPERTY(LOCATION ...), they are deprecated in
cmake 3.9
- simplify signing targets on Windows.
- remove INSTALL_DEBUG_TARGET, we do not mix binaries from different builds
in the same package
2017-09-08 18:22:15 +00:00

18 lines
545 B
CMake

FILE(GLOB_RECURSE files "@CMAKE_BINARY_DIR@/*.signme")
MESSAGE(STATUS "signing files")
FOREACH(f ${files})
STRING(REPLACE ".signme" "" exe_location "${f}")
string (REPLACE ";" " " params "@SIGNTOOL_PARAMETERS@")
#MESSAGE("@SIGNTOOL_EXECUTABLE@" sign ${params} "${exe_location}")
EXECUTE_PROCESS(COMMAND
"@SIGNTOOL_EXECUTABLE@" sign @SIGNTOOL_PARAMETERS@ "${exe_location}"
RESULT_VARIABLE ERR)
IF(NOT ${ERR} EQUAL 0)
MESSAGE( "Error ${ERR} signing ${exe_location}")
ELSE()
FILE(REMOVE ${f})
ENDIF()
ENDFOREACH()