Skip to content

Commit

Permalink
Windows|CMake: Sign the deployed executables and libraries
Browse files Browse the repository at this point in the history
Use the correct installation components so CPack will find the right
files when signing.
  • Loading branch information
skyjake committed Mar 21, 2016
1 parent 702cba9 commit b98d750
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions doomsday/cmake/Macros.cmake
Expand Up @@ -419,7 +419,7 @@ macro (deng_deploy_library target name)
endif ()
if (WIN32 AND DENG_SIGNTOOL_CERT)
get_property (_outName TARGET ${target} PROPERTY OUTPUT_NAME)
deng_signtool (bin/${_outName}.dll)
deng_signtool (bin/${_outName}.dll libs)
endif ()
endmacro (deng_deploy_library)

Expand Down Expand Up @@ -449,7 +449,7 @@ macro (deng_codesign target)
endif ()
if (WIN32 AND DENG_SIGNTOOL_CERT)
get_property (_outName TARGET ${target} PROPERTY OUTPUT_NAME)
deng_signtool (bin/${_outName}.exe)
deng_signtool (bin/${_outName}.exe "")
endif ()
endmacro ()

Expand Down Expand Up @@ -707,7 +707,7 @@ function (deng_install_tool target)
if (NOT _outName)
set (_outName ${target})
endif ()
deng_signtool (bin/${_outName}.exe)
deng_signtool (bin/${_outName}.exe ${comp})
endif ()
endif ()
endfunction (deng_install_tool)
Expand Down
3 changes: 2 additions & 1 deletion doomsday/cmake/PlatformWindows.cmake
Expand Up @@ -20,14 +20,15 @@ set (DENG_SIGNTOOL_PASSPHRASE "" CACHE STRING "Signing certificate passphrase.")
find_program (SIGNTOOL_COMMAND signtool)
mark_as_advanced (SIGNTOOL_COMMAND)

function (deng_signtool path)
function (deng_signtool path comp)
install (CODE "message (STATUS \"Signing ${path}...\")
execute_process (COMMAND \"${SIGNTOOL_COMMAND}\" sign
/f \"${DENG_SIGNTOOL_CERT}\"
/p ${DENG_SIGNTOOL_PASSPHRASE}
/t http://timestamp.verisign.com/scripts/timstamp.dll
\"\${CMAKE_INSTALL_PREFIX}/${path}\"
)"
COMPONENT ${comp}
)
endfunction ()

Expand Down

0 comments on commit b98d750

Please sign in to comment.