mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-10-23 03:26:59 +09:00
* fix: windows certificate signing issues * fix: add has_ui option and phys/cloud opts
34 lines
1.1 KiB
CMake
34 lines
1.1 KiB
CMake
if(NOT DEFINED SIGNTOOL_SUBJECT_NAME)
|
|
set(SIGNTOOL_SUBJECT_NAME "$ENV{SIGNTOOL_SUBJECT_NAME}")
|
|
endif()
|
|
if(NOT DEFINED SIGNTOOL_CERT_HAS_UI)
|
|
set(SIGNTOOL_CERT_HAS_UI "$ENV{SIGNTOOL_CERT_HAS_UI}")
|
|
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()
|
|
|
|
if(WIN32)
|
|
if (SIGNTOOL_SUBJECT_NAME)
|
|
include(${CMAKE_CURRENT_LIST_DIR}/util/signtool.cmake)
|
|
foreach(PACKAGE_FILE IN LISTS CPACK_PACKAGE_FILES)
|
|
signtool_sign_files("${PACKAGE_FILE}" "${SIGNTOOL_SUBJECT_NAME}" "${SIGNTOOL_CERT_HAS_UI}")
|
|
endforeach()
|
|
endif()
|
|
endif()
|
|
|
|
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()
|