blob: d2dc5305bb5ced033250953f6effd8cf31fe6262 (
plain)
1
2
3
4
5
6
7
8
|
function(xcode_sign_adhoc target)
if(CMAKE_GENERATOR STREQUAL "Xcode" AND
"${CMAKE_SYSTEM_NAME};${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "Darwin;arm64")
# Xcode runs POST_BUILD before signing, so let the linker use ad-hoc signing.
# See CMake Issue 21845.
target_link_options(${target} PRIVATE LINKER:-adhoc_codesign)
endif()
endfunction()
|