diff ui/CMakeLists.txt @ 1071:fc4e1fe4e4d4

(issue116) Sign binaries with test certificate if RELESE_BUILD option is not used
author Andre Heinecke <andre.heinecke@intevation.de>
date Wed, 10 Sep 2014 17:52:11 +0200
parents 126e5ce4d1d1
children 3ee529f42974
line wrap: on
line diff
--- a/ui/CMakeLists.txt	Wed Sep 10 16:41:36 2014 +0200
+++ b/ui/CMakeLists.txt	Wed Sep 10 17:52:11 2014 +0200
@@ -236,6 +236,27 @@
       POST_BUILD
       COMMAND ${CMAKE_STRIP} trustbridge-admin.exe
    )
+   if (NOT RELEASE_BUILD)
+      message("Status will sign.")
+      add_custom_command(
+         TARGET trustbridge
+         POST_BUILD
+         COMMAND ${OSSLSIGNCODE_EXECUTABLE} sign -certs ${CMAKE_SOURCE_DIR}/ui/tests/data/codesign/codesigning.pem
+         -key ${CMAKE_SOURCE_DIR}/ui/tests/data/codesign/codesigning.key
+         -h sha256 -in ${CMAKE_CURRENT_BINARY_DIR}/trustbridge.exe
+         -out ${CMAKE_CURRENT_BINARY_DIR}/trustbridge-signed.exe &&
+         mv ${CMAKE_CURRENT_BINARY_DIR}/trustbridge-signed.exe ${CMAKE_CURRENT_BINARY_DIR}/trustbridge.exe
+         )
+      add_custom_command(
+         TARGET trustbridge-admin
+         POST_BUILD
+         COMMAND ${OSSLSIGNCODE_EXECUTABLE} sign -certs ${CMAKE_SOURCE_DIR}/ui/tests/data/codesign/codesigning.pem
+         -key ${CMAKE_SOURCE_DIR}/ui/tests/data/codesign/codesigning.key
+         -h sha256 -in ${CMAKE_CURRENT_BINARY_DIR}/trustbridge-admin.exe
+         -out ${CMAKE_CURRENT_BINARY_DIR}/trustbridge-admin-signed.exe &&
+         mv ${CMAKE_CURRENT_BINARY_DIR}/trustbridge-admin-signed.exe ${CMAKE_CURRENT_BINARY_DIR}/trustbridge-admin.exe
+         )
+    endif()
 else()
    add_custom_command(
       TARGET trustbridge

http://wald.intevation.org/projects/trustbridge/