mirror of
https://github.com/etlegacy/Update-Installer.git
synced 2024-11-10 06:31:49 +00:00
Enable customization of the tool used to sign the updater
Add a BINARY_SIGNING_TOOL CMake var which can be overridden to specify a custom script/tool to use to sign the updater binary.
This commit is contained in:
parent
401785786a
commit
dab236d8de
2 changed files with 7 additions and 5 deletions
|
@ -6,10 +6,12 @@ set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules")
|
|||
|
||||
# If the SIGN_UPDATER option is enabled, the updater.exe
|
||||
# binary is digitally signed on Windows after it has been built.
|
||||
# A script called sign-updater.bat must exist in the PATH or
|
||||
# the directory where updater.exe is built. This will be run
|
||||
# with the path of the binary to sign it.
|
||||
option(SIGN_UPDATER OFF)
|
||||
#
|
||||
# The script used to sign the binary is specified by BINARY_SIGNING_TOOL.
|
||||
# This tool must take a single argument which is the filename of the
|
||||
# binary to sign.
|
||||
option(SIGN_UPDATER "Enable signing of the updater binary" OFF)
|
||||
set(BINARY_SIGNING_TOOL sign-updater.bat CACHE PATH "Path to the tool used to sign the updater")
|
||||
|
||||
include_directories(external)
|
||||
include_directories(external/TinyThread/source)
|
||||
|
|
|
@ -130,7 +130,7 @@ target_link_libraries(updater
|
|||
)
|
||||
|
||||
if (SIGN_UPDATER)
|
||||
add_custom_command(TARGET updater POST_BUILD COMMAND sign-updater.bat updater.exe)
|
||||
add_custom_command(TARGET updater POST_BUILD COMMAND ${BINARY_SIGNING_TOOL} $<TARGET_FILE:updater>)
|
||||
endif()
|
||||
|
||||
install(TARGETS updater RUNTIME DESTINATION bin)
|
||||
|
|
Loading…
Reference in a new issue