From 3ce7e31f64d86b3ca58be61407a33380cda072b4 Mon Sep 17 00:00:00 2001 From: Owen Rudge Date: Mon, 24 May 2021 23:03:04 +0100 Subject: Feature: Sign Windows builds --- cmake/InstallAndPackage.cmake | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'cmake') diff --git a/cmake/InstallAndPackage.cmake b/cmake/InstallAndPackage.cmake index 9b7d65788..057f0934f 100644 --- a/cmake/InstallAndPackage.cmake +++ b/cmake/InstallAndPackage.cmake @@ -138,6 +138,13 @@ elseif(WIN32) endif() set(CPACK_PACKAGE_FILE_NAME "openttd-#CPACK_PACKAGE_VERSION#-windows-${CPACK_SYSTEM_NAME}") + + if(WINDOWS_CERTIFICATE_COMMON_NAME) + add_custom_command(TARGET openttd + POST_BUILD + COMMAND "${CMAKE_SOURCE_DIR}/os/windows/sign.bat" "$" "${WINDOWS_CERTIFICATE_COMMON_NAME}" + ) + endif() elseif(UNIX) # With FHS, we can create deb/rpm/... Without it, they would be horribly broken # and not work. The other way around is also true; with FHS they are not -- cgit v1.2.3-54-g00ecf