mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-27 04:41:23 +00:00
cmake: Adjust linkage for macOS
This properly links dylibs set during build instead of expecting the libraries to be in the system path. # Conflicts: # src/sdl/CMakeLists.txt
This commit is contained in:
parent
8e398504f5
commit
0ea3387b80
1 changed files with 20 additions and 27 deletions
|
@ -147,29 +147,23 @@ if(${SDL2_FOUND})
|
||||||
set_target_properties(SRB2SDL2 PROPERTIES OUTPUT_NAME ${SRB2_SDL2_EXE_NAME})
|
set_target_properties(SRB2SDL2 PROPERTIES OUTPUT_NAME ${SRB2_SDL2_EXE_NAME})
|
||||||
|
|
||||||
if(${CMAKE_SYSTEM} MATCHES Darwin)
|
if(${CMAKE_SYSTEM} MATCHES Darwin)
|
||||||
find_library(CORE_LIB CoreFoundation)
|
find_library(CORE_FOUNDATION_LIBRARY "CoreFoundation")
|
||||||
target_link_libraries(SRB2SDL2 PRIVATE
|
target_link_libraries(SRB2SDL2 PRIVATE
|
||||||
${CORE_LIB}
|
${CORE_FOUNDATION_LIBRARY}
|
||||||
SDL2
|
|
||||||
SDL2_mixer
|
|
||||||
${GME_LIBRARIES}
|
|
||||||
${PNG_LIBRARIES}
|
|
||||||
${ZLIB_LIBRARIES}
|
|
||||||
${OPENGL_LIBRARIES}
|
|
||||||
${CURL_LIBRARIES}
|
|
||||||
${DISCORDRPC_LIBRARIES}
|
|
||||||
)
|
)
|
||||||
set_target_properties(SRB2SDL2 PROPERTIES OUTPUT_NAME "${CPACK_PACKAGE_DESCRIPTION_SUMMARY}")
|
set_target_properties(SRB2SDL2 PROPERTIES OUTPUT_NAME "${CPACK_PACKAGE_DESCRIPTION_SUMMARY}")
|
||||||
else()
|
endif()
|
||||||
|
|
||||||
target_link_libraries(SRB2SDL2 PRIVATE
|
target_link_libraries(SRB2SDL2 PRIVATE
|
||||||
${SDL2_LIBRARIES}
|
${SDL2_LIBRARIES}
|
||||||
${SDL2_MIXER_LIBRARIES}
|
${SDL2_MIXER_LIBRARIES}
|
||||||
${GME_LIBRARIES}
|
${GME_LIBRARIES}
|
||||||
|
${OPENMPT_LIBRARIES}
|
||||||
|
${MIXERX_LIBRARIES}
|
||||||
${PNG_LIBRARIES}
|
${PNG_LIBRARIES}
|
||||||
${ZLIB_LIBRARIES}
|
${ZLIB_LIBRARIES}
|
||||||
${OPENGL_LIBRARIES}
|
${OPENGL_LIBRARIES}
|
||||||
${CURL_LIBRARIES}
|
${CURL_LIBRARIES}
|
||||||
${DISCORDRPC_LIBRARIES}
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if(${CMAKE_SYSTEM} MATCHES Linux)
|
if(${CMAKE_SYSTEM} MATCHES Linux)
|
||||||
|
@ -178,7 +172,6 @@ if(${SDL2_FOUND})
|
||||||
rt
|
rt
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
|
||||||
|
|
||||||
#target_link_libraries(SRB2SDL2 PRIVATE SRB2Core)
|
#target_link_libraries(SRB2SDL2 PRIVATE SRB2Core)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue