Skip to content

Commit e1e7747

Browse files
committed
Make OSC_CODESIGN_DEVELOPER_ID, OSC_NOTARIZATION_APPLE_ID, OSC_NOTARIZATION_TEAM_ID, and OSC_NOTARIZATION_PASSWORD settable via environment vars
1 parent c46e9d2 commit e1e7747

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packaging/MacOS/Packaging.cmake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ endif()
6262

6363
# Handle code signing (notarization is separate - below)
6464
if(OSC_CODESIGN_ENABLED)
65-
set(OSC_CODESIGN_DEVELOPER_ID "" CACHE STRING "The developer ID string for the codesigning key (e.g. 'Developer ID Application: Some Developer (XYA12398BF)'). Get it with `security find-identity -p codesigning -v`")
65+
set(OSC_CODESIGN_DEVELOPER_ID "$ENV{OSC_CODESIGN_DEVELOPER_ID}" CACHE STRING "The developer ID string for the codesigning key (e.g. 'Developer ID Application: Some Developer (XYA12398BF)'). Get it with `security find-identity -p codesigning -v`")
6666
if(NOT OSC_CODESIGN_DEVELOPER_ID)
6767
message(FATAL_ERROR "OSC_CODESIGN_DEVELOPER_ID must be set if OSC_CODESIGN_ENABLED is on")
6868
endif()
@@ -90,9 +90,9 @@ if(OSC_NOTARIZATION_ENABLED)
9090
message(FATAL_ERROR "OSC_NOTARIZATION_ENABLED is ${OSC_NOTARIZATION_ENABLED} but OSC_CODESIGN_ENABLED is ${OSC_CODESIGN_ENABLED}: notarization requires code signing to be enabled")
9191
endif()
9292

93-
set(OSC_NOTARIZATION_APPLE_ID "" CACHE STRING "Apple ID of the signer (e.g. '[email protected]')")
94-
set(OSC_NOTARIZATION_TEAM_ID "" CACHE STRING "Team ID of the signer (usually, random-looking string at the end of OSC_CODESIGN_DEVELOPER_ID)")
95-
set(OSC_NOTARIZATION_PASSWORD "" CACHE STRING "App-specific password of the signer (you can create this from your apple ID account)")
93+
set(OSC_NOTARIZATION_APPLE_ID "$ENV{OSC_NOTARIZATION_APPLE_ID}" CACHE STRING "Apple ID of the signer (e.g. '[email protected]')")
94+
set(OSC_NOTARIZATION_TEAM_ID "$ENV{OSC_NOTARIZATION_TEAM_ID}" CACHE STRING "Team ID of the signer (usually, random-looking string at the end of OSC_CODESIGN_DEVELOPER_ID)")
95+
set(OSC_NOTARIZATION_PASSWORD "$ENV{OSC_NOTARIZATION_PASSWORD}" CACHE STRING "App-specific password of the signer (you can create this from your apple ID account)")
9696

9797
if(NOT OSC_NOTARIZATION_APPLE_ID)
9898
message(FATAL_ERROR "OSC_NOTARIZATION_APPLE_ID must be set if OSC_NOTARIZATION_ENABLED is on")

0 commit comments

Comments
 (0)