mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 14:44:36 +00:00
sign dylibs postbuild
This commit is contained in:
parent
0fe6736634
commit
142bfc4382
2 changed files with 33 additions and 1 deletions
|
|
@ -64,4 +64,32 @@ set(CMAKE_INSTALL_RPATH "@executable_path/../Frameworks")
|
|||
set(CMAKE_BUILD_RPATH "@executable_path/../Frameworks")
|
||||
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||
|
||||
function(sign_dylibs_post_build TARGET)
|
||||
if(NOT APPLE)
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(NOT ARGN)
|
||||
message(WARNING "sign_dylibs_post_build: no dylibs provided for target '${TARGET}'")
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED APPLE_CODESIGN_IDENTITY)
|
||||
set(APPLE_CODESIGN_IDENTITY "-")
|
||||
endif()
|
||||
|
||||
foreach(DYLIB_PATH IN LISTS ARGN)
|
||||
add_custom_command(TARGET ${TARGET} POST_BUILD
|
||||
COMMAND codesign
|
||||
--force
|
||||
--sign "${APPLE_CODESIGN_IDENTITY}"
|
||||
--timestamp
|
||||
--options runtime
|
||||
"${DYLIB_PATH}"
|
||||
COMMENT "Signing ${DYLIB_PATH}"
|
||||
VERBATIM
|
||||
)
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
endif(APPLE)
|
||||
Loading…
Add table
Add a link
Reference in a new issue