diff --git a/win/packaging/CMakeLists.txt b/win/packaging/CMakeLists.txt index b3ccaaa308f..4bd34c86a40 100644 --- a/win/packaging/CMakeLists.txt +++ b/win/packaging/CMakeLists.txt @@ -207,8 +207,13 @@ IF(CMAKE_GENERATOR MATCHES "Visual Studio") SET(CPACK_CONFIG_PARAM -C $(Configuration)) ENDIF() +IF(SIGNCODE) + SET(SIGN_COMMAND COMMAND ${CMAKE_COMMAND} -P ${PROJECT_BINARY_DIR}/sign.cmake) +ENDIF() + ADD_CUSTOM_TARGET( win_package + ${SIGN_COMMAND} COMMAND cpack ${CPACK_CONFIG_PARAM} --config ${CMAKE_CURRENT_SOURCE_DIR}/CPackZipConfig.cmake COMMAND cpack ${CPACK_CONFIG_PARAM} --config ${CMAKE_CURRENT_SOURCE_DIR}/CPackZipDebugInfoConfig.cmake WORKING_DIRECTORY ${CMAKE_BINARY_DIR}