Apple Xcode project build fixes for renderdoccmd

Building via Xcode does not include "stdc++" by default (probably a difference between cland and clang++).
Building via Xcode puts the static library "renderdoc_libentry" into a different folder than the shared library "renderdoc"
Pass the full path to the static library "renderdoc_libentry" on the link line.
This commit is contained in:
Jake Turner
2021-04-29 06:08:16 +01:00
committed by Baldur Karlsson
parent 99568927a2
commit c81f46c83a
+2 -1
View File
@@ -22,6 +22,7 @@ if(ANDROID)
PRIVATE -landroid)
elseif(APPLE)
list(APPEND RDOC_LIBRARIES
PRIVATE -lstdc++
PRIVATE -liconv
PRIVATE -lm
PRIVATE -ldl)
@@ -563,7 +564,7 @@ link_directories(${CMAKE_CURRENT_BINARY_DIR})
# On apple we need to pass the force_load parameter here - if we set it with LINK_FLAGS below
# it gets applied too early (even if the -lrenderdoc_libentry is later)
if(APPLE)
list(APPEND RDOC_LIBRARIES PRIVATE "-Wl,-force_load,librenderdoc_libentry.a -lrenderdoc_libentry")
list(APPEND RDOC_LIBRARIES PRIVATE "-Wl,-force_load,$<TARGET_FILE:renderdoc_libentry>")
else()
list(APPEND RDOC_LIBRARIES PRIVATE -lrenderdoc_libentry)
endif()