Skip to content

Commit 69adfaf

Browse files
committed
Guard standalone logic with pluginval_IS_TOP_LEVEL
1 parent abec715 commit 69adfaf

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

CMakeLists.txt

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,27 @@ 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
# Uncomment to enable tsan
1521
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=thread")
1622

17-
1823
# Adds all the module sources so they appear correctly in the IDE
1924
set_property(GLOBAL PROPERTY USE_FOLDERS YES)
2025
option(JUCE_ENABLE_MODULE_SOURCE_GROUPS "Enable Module Source Groups" ON)
2126

22-
option(PLUGINVAL_FETCH_JUCE "Fetch JUCE along with PluginVal" ON)
23-
24-
if(PLUGINVAL_FETCH_JUCE)
25-
add_subdirectory(modules/juce)
26-
endif()
27-
2827
if (DEFINED ENV{VST2_SDK_DIR})
2928
MESSAGE(STATUS "Building with VST2 SDK: $ENV{VST2_SDK_DIR}")
3029
juce_set_vst2_sdk_path($ENV{VST2_SDK_DIR})

0 commit comments

Comments
 (0)