mirror of
https://github.com/etlegacy/Update-Installer.git
synced 2024-11-21 19:31:49 +00:00
Add SIGN_UPDATER build option to automatically sign updater.exe during the build on Windows
This requires a script called sign-updater.bat to be present in PATH or the build directory for updater.exe to perform the signing.
This commit is contained in:
parent
38bb0e8787
commit
31be2336fb
2 changed files with 11 additions and 0 deletions
|
@ -3,6 +3,13 @@ project(updater)
|
|||
cmake_minimum_required(VERSION 2.6)
|
||||
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)
|
||||
|
||||
include_directories(external)
|
||||
include_directories(external/TinyThread/source)
|
||||
|
||||
|
|
|
@ -118,5 +118,9 @@ target_link_libraries(updater
|
|||
updatershared
|
||||
)
|
||||
|
||||
if (SIGN_UPDATER)
|
||||
add_custom_command(TARGET updater POST_BUILD COMMAND sign-updater.bat updater.exe)
|
||||
endif()
|
||||
|
||||
install(TARGETS updater RUNTIME DESTINATION bin)
|
||||
|
||||
|
|
Loading…
Reference in a new issue