From e036531796538a2513416629ec5ca93522793dfc Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Tue, 12 Jan 2016 16:22:37 -0800 Subject: [PATCH] attempt to sign executable as a post build step --- cmake/macros/OptionalWinExecutableSigning.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmake/macros/OptionalWinExecutableSigning.cmake b/cmake/macros/OptionalWinExecutableSigning.cmake index a79a9b0cf9..4a33a513ba 100644 --- a/cmake/macros/OptionalWinExecutableSigning.cmake +++ b/cmake/macros/OptionalWinExecutableSigning.cmake @@ -24,8 +24,12 @@ macro(optional_win_executable_signing) set(EXECUTABLE_NAME $) endif () - # setup the post install command to sign the executable + add_custom_command( + TARGET ${TARGET_NAME} POST_BUILD + COMMAND ${SIGNTOOL_EXEC} sign /f $ENV{HF_PFX_FILE} /p $ENV{HF_PFX_PASSPHRASE} /tr http://tsa.starfieldtech.com\ /td SHA256 $ + ) + # setup the post install command to sign the executable install(CODE "\ message(STATUS \"Signing ${TARGET_NAME} with signtool.\") execute_process(COMMAND ${SIGNTOOL_EXEC} sign /f $ENV{HF_PFX_FILE}\