From 99568927a210e45efa580d3a77d985bb663cb164 Mon Sep 17 00:00:00 2001 From: Jake Turner Date: Sun, 2 May 2021 13:06:21 +0100 Subject: [PATCH] Specify the Apple Xcode cmake output directories For Xcode set the output directory to be the same for all configurations By default Xcode puts binary and library outputs in a different folder per configuration --- CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 313801200..473f1821d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -290,6 +290,15 @@ endif() set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib") set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") +if(APPLE) + # For Xcode set the output directory to be the same for all configurations + set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/lib") + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/bin") + + set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}/lib") + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}/bin") +endif() + if(ENABLE_GL) add_definitions(-DRENDERDOC_SUPPORT_GL) endif()