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
This commit is contained in:
Jake Turner
2021-05-02 13:06:21 +01:00
committed by Baldur Karlsson
parent d158ed2a6b
commit 99568927a2
+9
View File
@@ -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()