@@ -3,12 +3,18 @@ cmake_minimum_required(VERSION 3.15)
33file (STRINGS VERSION CURRENT_VERSION LIMIT_COUNT 1)
44project (pluginval VERSION ${CURRENT_VERSION} )
55
6- if (APPLE )
7- # Target OS versions down to 10.11
8- set (CMAKE_OSX_DEPLOYMENT_TARGET "10.11" CACHE INTERNAL "" )
6+ # Executes when not compiling as a "dependency" of another CMake project
7+ if (pluginval_IS_TOP_LEVEL)
8+ add_subdirectory (modules/juce)
9+
10+ if (APPLE )
11+ # Target OS versions down to 10.11
12+ set (CMAKE_OSX_DEPLOYMENT_TARGET "10.11" CACHE INTERNAL "" )
13+
14+ # Uncomment to produce a universal binary
15+ # set(CMAKE_OSX_ARCHITECTURES arm64 x86_64)
16+ endif ()
917
10- # Uncomment to produce a universal binary
11- # set(CMAKE_OSX_ARCHITECTURES arm64 x86_64)
1218endif ()
1319
1420# sanitizer options, from https://github.com/sudara/cmake-includes/blob/main/Sanitizers.cmake
@@ -41,12 +47,6 @@ endif ()
4147set_property (GLOBAL PROPERTY USE_FOLDERS YES )
4248option (JUCE_ENABLE_MODULE_SOURCE_GROUPS "Enable Module Source Groups" ON )
4349
44- option (PLUGINVAL_FETCH_JUCE "Fetch JUCE along with PluginVal" ON )
45-
46- if (PLUGINVAL_FETCH_JUCE)
47- add_subdirectory (modules/juce)
48- endif ()
49-
5050if (DEFINED ENV{VST2_SDK_DIR})
5151 MESSAGE (STATUS "Building with VST2 SDK: $ENV{VST2_SDK_DIR} " )
5252 juce_set_vst2_sdk_path($ENV{VST2_SDK_DIR} )
0 commit comments