summaryrefslogtreecommitdiff
path: root/cmake/sign.cmake.in
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/sign.cmake.in')
-rw-r--r--cmake/sign.cmake.in18
1 files changed, 18 insertions, 0 deletions
diff --git a/cmake/sign.cmake.in b/cmake/sign.cmake.in
new file mode 100644
index 00000000000..61ae38d152d
--- /dev/null
+++ b/cmake/sign.cmake.in
@@ -0,0 +1,18 @@
+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()