From c81f46c83a898a6a41eb4a689998e648e2b424f4 Mon Sep 17 00:00:00 2001 From: Jake Turner Date: Thu, 29 Apr 2021 06:08:16 +0100 Subject: [PATCH] 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. --- renderdoc/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/renderdoc/CMakeLists.txt b/renderdoc/CMakeLists.txt index 8e851dc3c..20690757a 100644 --- a/renderdoc/CMakeLists.txt +++ b/renderdoc/CMakeLists.txt @@ -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,$") else() list(APPEND RDOC_LIBRARIES PRIVATE -lrenderdoc_libentry) endif()