diff cinst/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 4f999c7821ce
children 148014db2f3b e210ecc32d69
line wrap: on
line diff
--- a/cinst/CMakeLists.txt	Wed Sep 10 16:41:36 2014 +0200
+++ b/cinst/CMakeLists.txt	Wed Sep 10 17:52:11 2014 +0200
@@ -36,6 +36,17 @@
       POST_BUILD
       COMMAND ${CMAKE_STRIP} cinst.exe
    )
+   if (NOT RELEASE_BUILD)
+      add_custom_command(
+         TARGET cinst
+         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}/cinst.exe
+         -out ${CMAKE_CURRENT_BINARY_DIR}/cinst-signed.exe &&
+         mv ${CMAKE_CURRENT_BINARY_DIR}/cinst-signed.exe ${CMAKE_CURRENT_BINARY_DIR}/cinst.exe
+         )
+    endif()
 else()
    add_custom_command(
       TARGET cinst
@@ -68,6 +79,17 @@
          POST_BUILD
          COMMAND ${CMAKE_STRIP} mozilla.exe
       )
+      if (NOT RELEASE_BUILD)
+         add_custom_command(
+            TARGET mozilla
+            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}/mozilla.exe
+            -out ${CMAKE_CURRENT_BINARY_DIR}/mozilla-signed.exe &&
+            mv ${CMAKE_CURRENT_BINARY_DIR}/mozilla-signed.exe ${CMAKE_CURRENT_BINARY_DIR}/mozilla.exe
+            )
+       endif()
    else()
       add_custom_command(
          TARGET mozilla

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