From 71243f505def28d7b53aa68c07b82c1a87d3820a Mon Sep 17 00:00:00 2001 From: Jake Turner Date: Sun, 2 May 2021 12:47:59 +0100 Subject: [PATCH] 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 --- CMakeLists.txt | 9 +++++++++ qrenderdoc/CMakeLists.txt | 5 +++++ 2 files changed, 14 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 473f1821d..2e4d8cb4c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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}") diff --git a/qrenderdoc/CMakeLists.txt b/qrenderdoc/CMakeLists.txt index 8c3acdaed..06463c488 100644 --- a/qrenderdoc/CMakeLists.txt +++ b/qrenderdoc/CMakeLists.txt @@ -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