From dd263ec72e44cfcc490ae05aeafe39b389be7b66 Mon Sep 17 00:00:00 2001 From: jatinchowdhury18 Date: Mon, 30 Oct 2023 14:13:13 -0700 Subject: [PATCH] Making sure Projucer workflow works with Xcode 15.0 (#137) * Making sure Projucer workflow works with Xcode 15.0 * CI fiddling * More xcode/cmake twiddling * Force CMake OSX deploymnet target for Xcode 15 * Bring back the rest of CI --- .github/workflows/build-projucer.yml | 9 ++++++++- CMakeLists.txt | 11 +++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-projucer.yml b/.github/workflows/build-projucer.yml index a8d24a3..49389cd 100644 --- a/.github/workflows/build-projucer.yml +++ b/.github/workflows/build-projucer.yml @@ -26,6 +26,13 @@ jobs: - os: macos-latest jucer: build/_deps/juce-src/extras/Projucer/Builds/MacOSX/build/Debug/Projucer.app/Contents/MacOS/Projucer clap_gen: "Xcode" + xcode_version: latest-stable + juce_version: "7.0.6" + cxx_standard: 17 + - os: macos-13 + jucer: build/_deps/juce-src/extras/Projucer/Builds/MacOSX/build/Debug/Projucer.app/Contents/MacOS/Projucer + clap_gen: "Xcode" + xcode_version: "15.0" juce_version: "7.0.6" cxx_standard: 17 - os: windows-2022 @@ -51,7 +58,7 @@ jobs: if: runner.os == 'MacOS' uses: maxim-lobanov/setup-xcode@v1 with: - xcode-version: latest-stable + xcode-version: ${{ matrix.xcode_version }} - name: Checkout code uses: actions/checkout@v2 diff --git a/CMakeLists.txt b/CMakeLists.txt index ce50ebf..1a31aac 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,6 +35,17 @@ endif() message( STATUS "Building CLAP with CLAP_CXX_STANDARD=${CLAP_CXX_STANDARD}") set(CMAKE_CXX_EXTENSIONS OFF) +if(CMAKE_GENERATOR STREQUAL Xcode) + # Funky work around for Xcode 15, see: https://forum.juce.com/t/vst-au-builds-fail-after-upgrading-to-xcode-15/57936/43 + message(STATUS "Configuring CJE with Xcode version ${XCODE_VERSION}") + if((${XCODE_VERSION} STREQUAL "15.0") OR (${XCODE_VERSION} STREQUAL "15.0.1")) + message(STATUS "Enabling Xcode 15 linker workaround!") + add_link_options("-Wl,-ld_classic") + add_compile_definitions(JUCE_SILENCE_XCODE_15_LINKER_WARNING=1) + set(CMAKE_OSX_DEPLOYMENT_TARGET "10.13" CACHE STRING "Minimum OS X deployment target" FORCE) + endif() +endif() + option(CLAP_JUCE_EXTENSIONS_BUILD_EXAMPLES "Add targets for building and running clap-juce-extensions examples" ${is_toplevel}) if(CLAP_JUCE_EXTENSIONS_BUILD_EXAMPLES) # The examples need JUCE to be imported before the CLAP helper targets