Xcode generator setup for Apple

Restrict the schemes to match the configuration on the cmake command line
Disable Debug Document Versioning
Specify the executable path for build-qrenderdoc target
This commit is contained in:
Jake Turner
2021-05-02 12:47:59 +01:00
committed by Baldur Karlsson
parent a71914c03d
commit 71243f505d
2 changed files with 14 additions and 0 deletions
+9
View File
@@ -3,6 +3,7 @@ cmake_minimum_required(VERSION 2.8.12)
if(APPLE)
SET(CMAKE_OSX_ARCHITECTURES "x86_64;arm64" CACHE STRING "Build architectures for Mac OS X" FORCE)
SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "Minimum SDK for Mac OS X" FORCE)
SET(CMAKE_XCODE_GENERATE_SCHEME ON)
endif()
# Configure some stuff that needs to be set really early
@@ -327,6 +328,14 @@ if(cmake_build_type_lower STREQUAL "release" OR
set(RELEASE_MODE 1)
endif()
if(APPLE)
if (RELEASE_MODE)
set(CMAKE_CONFIGURATION_TYPES "Release")
else()
set(CMAKE_CONFIGURATION_TYPES "Debug")
endif()
endif()
if(STRIP_ANDROID_LIBRARY AND BUILD_ANDROID AND RELEASE_MODE)
set(ANDROID_STRIP_TOOL "${ANDROID_TOOLCHAIN_ROOT}/bin/llvm-strip${ANDROID_TOOLCHAIN_SUFFIX}")
if(NOT EXISTS "${ANDROID_STRIP_TOOL}")
+5
View File
@@ -317,6 +317,11 @@ add_custom_command(OUTPUT QRenderDoc
DEPENDS RenderDoc.icns)
add_custom_target(build-qrenderdoc ALL DEPENDS QRenderDoc DEPENDS renderdoc DEPENDS swig-bindings)
if(APPLE)
set_target_properties(build-qrenderdoc PROPERTIES XCODE_SCHEME_DEBUG_DOCUMENT_VERSIONING OFF)
set_target_properties(build-qrenderdoc PROPERTIES XCODE_SCHEME_EXECUTABLE ${CMAKE_BINARY_DIR}/bin/qrenderdoc.app)
endif()
install (PROGRAMS ${CMAKE_BINARY_DIR}/bin/qrenderdoc DESTINATION bin)
# Install supporting files for file associations etc