-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #762 from byrnHDF/master-correct-creds
Corect the path to the credentials file
- Loading branch information
Showing
7 changed files
with
41 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -653,4 +653,3 @@ | |
} | ||
] | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,41 @@ | ||
# This script signs the targets for the package | ||
message(STATUS "Signing script for ${CPACK_EXPORT_LIBRARIES} and ${CPACK_EXPORT_UTILS}") | ||
foreach (target "${CPACK_EXPORT_LIBRARIES}") | ||
if (WIN32) | ||
# Sign the targets | ||
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 | ||
$<TARGET_FILE:${target}> | ||
WORKING_DIRECTORY ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/ALL_COMPONENTS_IN_ONE/${CPACK_PACKAGE_INSTALL_DIRECTORY}/lib | ||
) | ||
message(STATUS "Signing the target ${target}") | ||
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}" | ||
$<TARGET_FILE:${target}> | ||
WORKING_DIRECTORY ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/ALL_COMPONENTS_IN_ONE/${CPACK_PACKAGE_INSTALL_DIRECTORY}/lib | ||
) | ||
message(STATUS "Signing the target ${target}") | ||
else () | ||
set (target_path ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/ALL_COMPONENTS_IN_ONE/${CPACK_PACKAGE_INSTALL_DIRECTORY}/lib) | ||
message(STATUS "Signing the target ${target} using ${target_path}") | ||
endif () | ||
endforeach () | ||
message(STATUS "Signing script for ${CPACK_EXPORT_LIBRARIES} in ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/${CPACK_PACKAGE_INSTALL_DIRECTORY}") | ||
|
||
foreach (target "${CPACK_EXPORT_UTILS}") | ||
# RPM needs ALL_COMPONENTS_IN_ONE added to path between ${CPACK_TEMPORARY_INSTALL_DIRECTORY} and ${CPACK_PACKAGE_INSTALL_DIRECTORY} | ||
if (CPACK_GENERATOR MATCHES "RPM") | ||
set (CPACK_TARGET_FILE_DIRECTORY "${CPACK_TEMPORARY_INSTALL_DIRECTORY}/ALL_COMPONENTS_IN_ONE/${CPACK_PACKAGE_INSTALL_DIRECTORY}") | ||
elseif (CPACK_GENERATOR MATCHES "WIX" OR CPACK_GENERATOR MATCHES "NSIS") | ||
set (CPACK_TARGET_FILE_DIRECTORY "${CPACK_TEMPORARY_INSTALL_DIRECTORY}/libraries") | ||
elseif (CPACK_GENERATOR MATCHES "ZIP") | ||
set (CPACK_TARGET_FILE_DIRECTORY "${CPACK_TEMPORARY_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/*.*" "${CPACK_TARGET_FILE_DIRECTORY}/bin/*.*") | ||
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 | ||
$<TARGET_FILE:${target}> | ||
WORKING_DIRECTORY ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/ALL_COMPONENTS_IN_ONE/${CPACK_PACKAGE_INSTALL_DIRECTORY}/bin | ||
${targetfile} | ||
) | ||
execute_process ( | ||
COMMAND ${CMAKE_COMMAND} -E echo "Signing the target ${targetfile}" | ||
) | ||
message(STATUS "Signing the target ${target}") | ||
elseif (APPLE) | ||
# Sign the targets | ||
execute_process(COMMAND codesign | ||
execute_process (COMMAND codesign | ||
--force --timestamp --options runtime --entitlements ${CMAKE_CURRENT_SOURCE_DIR}/config/cmake/distribution.entitlements | ||
--verbose=4 --strict --sign "$ENV{SIGNER}" | ||
$<TARGET_FILE:${target}> | ||
WORKING_DIRECTORY ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/ALL_COMPONENTS_IN_ONE/${CPACK_PACKAGE_INSTALL_DIRECTORY}/bin | ||
${targetfile} | ||
) | ||
execute_process ( | ||
COMMAND ${CMAKE_COMMAND} -E echo "Signing the target ${targetfile}" | ||
) | ||
message(STATUS "Signing the target ${target}") | ||
else () | ||
set (target_path ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/ALL_COMPONENTS_IN_ONE/${CPACK_PACKAGE_INSTALL_DIRECTORY}/bin) | ||
message(DEBUG "Signing the target ${target} using ${target_path}") | ||
execute_process ( | ||
COMMAND ${CMAKE_COMMAND} -E echo "Signing the target ${targetfile}" | ||
) | ||
endif () | ||
endforeach () |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters