enable hardened runtime on macOS builds

This commit is contained in:
Kae 2024-12-27 21:08:41 +11:00
parent 5cf11ead98
commit 8f1cadbbf2

View File

@ -31,12 +31,16 @@ ADD_EXECUTABLE (starbound WIN32
$<TARGET_OBJECTS:star_application> $<TARGET_OBJECTS:star_rendering> $<TARGET_OBJECTS:star_windowing> $<TARGET_OBJECTS:star_frontend> $<TARGET_OBJECTS:star_application> $<TARGET_OBJECTS:star_rendering> $<TARGET_OBJECTS:star_windowing> $<TARGET_OBJECTS:star_frontend>
${star_client_HEADERS} ${star_client_SOURCES} ${star_client_RESOURCES}) ${star_client_HEADERS} ${star_client_SOURCES} ${star_client_RESOURCES})
IF(STAR_PRECOMPILED_HEADERS) IF (STAR_PRECOMPILED_HEADERS)
TARGET_PRECOMPILE_HEADERS (starbound REUSE_FROM star_core) TARGET_PRECOMPILE_HEADERS (starbound REUSE_FROM star_core)
ENDIF() ENDIF()
IF(UNIX) IF (UNIX)
set_target_properties (starbound PROPERTIES LINK_FLAGS "-Wl,-rpath,'$ORIGIN'") SET_TARGET_PROPERTIES (starbound PROPERTIES LINK_FLAGS "-Wl,-rpath,'$ORIGIN'")
ENDIF()
IF (STAR_SYSTEM_MACOS)
SET_TARGET_PROPERTIES (starbound PROPERTIES XCODE_ATTRIBUTE_ENABLE_HARDENED_RUNTIME YES)
ENDIF() ENDIF()
TARGET_LINK_LIBRARIES (starbound ${STAR_EXT_LIBS} ${STAR_EXT_GUI_LIBS}) TARGET_LINK_LIBRARIES (starbound ${STAR_EXT_LIBS} ${STAR_EXT_GUI_LIBS})