From bfea6c6cd82816a6542f6d9bf716d08132e4030d Mon Sep 17 00:00:00 2001 From: reuk Date: Sun, 26 Apr 2020 18:32:39 +0100 Subject: [PATCH] CMake: Fix 3.12 compatibility issues --- CMakeLists.txt | 6 +++++- extras/Build/juceaide/CMakeLists.txt | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f99cbda18c..68f9efa019 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -72,11 +72,15 @@ endif() # ================================================================================================== # Install configuration +if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.14") + set(extra_version_arg ARCH_INDEPENDENT) +endif() + include(CMakePackageConfigHelpers) write_basic_package_version_file("${JUCE_BINARY_DIR}/JUCEConfigVersion.cmake" VERSION ${JUCE_VERSION} COMPATIBILITY ExactVersion - ARCH_INDEPENDENT) + ${extra_version_arg}) set(JUCE_INSTALL_DESTINATION "lib/cmake/JUCE-${JUCE_VERSION}" CACHE STRING "The location, relative to the install prefix, where the JUCE config file will be installed") diff --git a/extras/Build/juceaide/CMakeLists.txt b/extras/Build/juceaide/CMakeLists.txt index 7dfa3aea6e..6a4b20ac7c 100644 --- a/extras/Build/juceaide/CMakeLists.txt +++ b/extras/Build/juceaide/CMakeLists.txt @@ -49,6 +49,7 @@ else() # Looks like we're boostrapping, reinvoke CMake execute_process(COMMAND "${CMAKE_COMMAND}" + "." "-B${JUCE_BINARY_DIR}/tools" "-G${CMAKE_GENERATOR}" "-DCMAKE_BUILD_TYPE=Debug"