Skip to content

Commit

Permalink
Add RPM dir and comment apple
Browse files Browse the repository at this point in the history
  • Loading branch information
byrnHDF committed Sep 4, 2024
1 parent 523e3c3 commit 68955b3
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions config/cmake/SignPackageFiles.cmake
Original file line number Diff line number Diff line change
@@ -1,30 +1,36 @@
# This script signs the targets for the package
message(STATUS "Signing script for ${CPACK_EXPORT_LIBRARIES} in ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/${CPACK_PACKAGE_INSTALL_DIRECTORY}")

# RPM needs ALL_COMPONENTS_IN_ONE added to path between ${CPACK_TEMPORARY_INSTALL_DIRECTORY} and ${CPACK_PACKAGE_INSTALL_DIRECTORY}
file(GLOB target_list LIST_DIRECTORIES false "${CPACK_TEMPORARY_INSTALL_DIRECTORY}/${CPACK_PACKAGE_INSTALL_DIRECTORY}/lib/plugin/*.*")
if (CPACK_GENERATOR MATCHES "RPM")
set (CPACK_TARGET_FILE_DIRECTORY "${CPACK_TEMPORARY_INSTALL_DIRECTORY}/ALL_COMPONENTS_IN_ONE/${CPACK_PACKAGE_INSTALL_DIRECTORY}")
else ()
set (CPACK_TARGET_FILE_DIRECTORY "${CPACK_TEMPORARY_INSTALL_DIRECTORY}/${CPACK_PACKAGE_INSTALL_DIRECTORY}")
endif ()
file (GLOB target_list LIST_DIRECTORIES false "${CPACK_TARGET_FILE_DIRECTORY}/lib/plugin/*.*")
foreach (targetfile IN LISTS target_list)
if (WIN32)
# Sign the targets
execute_process(COMMAND $ENV{SIGNTOOLDIR}/signtool
execute_process (COMMAND $ENV{SIGNTOOLDIR}/signtool
sign /v /debug /fd SHA256 /tr http://timestamp.acs.microsoft.com /td SHA256
/dlib "Microsoft.Trusted.Signing.Client/bin/x64/Azure.CodeSigning.Dlib.dll" /dmdf ${CMAKE_CURRENT_SOURCE_DIR}/credentials.json
${targetfile}
)
execute_process(
execute_process (
COMMAND ${CMAKE_COMMAND} -E echo "Signing the target ${targetfile}"
)
elseif (APPLE)
# Sign the targets
execute_process(COMMAND codesign
--force --timestamp --options runtime --entitlements ${CMAKE_CURRENT_SOURCE_DIR}/config/cmake/distribution.entitlements
--verbose=4 --strict --sign "$ENV{SIGNER}"
${targetfile}
)
execute_process(
#execute_process (COMMAND codesign
# --force --timestamp --options runtime --entitlements ${CMAKE_CURRENT_SOURCE_DIR}/config/cmake/distribution.entitlements
# --verbose=4 --strict --sign "$ENV{SIGNER}"
# ${targetfile}
#)
execute_process (
COMMAND ${CMAKE_COMMAND} -E echo "Signing the target ${targetfile}"
)
else ()
execute_process(
execute_process (
COMMAND ${CMAKE_COMMAND} -E echo "Signing the target ${targetfile}"
)
endif ()
Expand Down

0 comments on commit 68955b3

Please sign in to comment.