Skip to content

Commit 2c712ef

Browse files
committed
Guard standalone logic with pluginval_IS_TOP_LEVEL
1 parent 552a311 commit 2c712ef

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

CMakeLists.txt

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,18 @@ cmake_minimum_required(VERSION 3.15)
33
file(STRINGS VERSION CURRENT_VERSION LIMIT_COUNT 1)
44
project(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)
1218
endif()
1319

1420
# sanitizer options, from https://github.com/sudara/cmake-includes/blob/main/Sanitizers.cmake
@@ -41,12 +47,6 @@ endif ()
4147
set_property(GLOBAL PROPERTY USE_FOLDERS YES)
4248
option(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-
5050
if (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

Comments
 (0)