2026-04-16 01:57:25 +02:00
|
|
|
if(NOT DEFINED SIGNTOOL_SUBJECT_NAME)
|
|
|
|
|
set(SIGNTOOL_SUBJECT_NAME "$ENV{SIGNTOOL_SUBJECT_NAME}")
|
|
|
|
|
endif()
|
|
|
|
|
if(NOT DEFINED NOTARYTOOL_EMAIL)
|
|
|
|
|
set(NOTARYTOOL_EMAIL "$ENV{NOTARYTOOL_EMAIL}")
|
|
|
|
|
endif()
|
|
|
|
|
if(NOT DEFINED NOTARYTOOL_TEAM_ID)
|
|
|
|
|
set(NOTARYTOOL_TEAM_ID "$ENV{NOTARYTOOL_TEAM_ID}")
|
|
|
|
|
endif()
|
|
|
|
|
if(NOT DEFINED NOTARYTOOL_PASSWORD)
|
|
|
|
|
set(NOTARYTOOL_PASSWORD "$ENV{NOTARYTOOL_PASSWORD}")
|
|
|
|
|
endif()
|
|
|
|
|
|
2026-04-05 06:18:18 +02:00
|
|
|
if(WIN32)
|
2026-04-13 02:56:18 +02:00
|
|
|
if (SIGNTOOL_SUBJECT_NAME)
|
2026-04-05 06:18:18 +02:00
|
|
|
include(${CMAKE_CURRENT_LIST_DIR}/util/signtool.cmake)
|
|
|
|
|
foreach(PACKAGE_FILE IN LISTS CPACK_PACKAGE_FILES)
|
|
|
|
|
signtool_sign_files("${PACKAGE_FILE}" "${SIGNTOOL_SUBJECT_NAME}")
|
|
|
|
|
endforeach()
|
|
|
|
|
endif()
|
|
|
|
|
endif()
|
2026-04-13 02:56:18 +02:00
|
|
|
|
|
|
|
|
if(APPLE)
|
|
|
|
|
if(NOTARYTOOL_EMAIL AND NOTARYTOOL_TEAM_ID AND NOTARYTOOL_PASSWORD)
|
|
|
|
|
include(${CMAKE_CURRENT_LIST_DIR}/util/notarytool.cmake)
|
|
|
|
|
foreach(file IN LISTS CPACK_PACKAGE_FILES)
|
|
|
|
|
notarize_and_staple_file("${file}" "${NOTARYTOOL_EMAIL}" "${NOTARYTOOL_TEAM_ID}" "${NOTARYTOOL_PASSWORD}")
|
|
|
|
|
endforeach()
|
|
|
|
|
endif()
|
|
|
|
|
endif()
|