-
Notifications
You must be signed in to change notification settings - Fork 52
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
58 lines (50 loc) · 1.97 KB
/
CMakeLists.txt
File metadata and controls
58 lines (50 loc) · 1.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
cmake_minimum_required(VERSION 3.15)
project(sparta_head VERSION 1.8.2)
# Build everything as "Release" by default
if (NOT CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL "")
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "" FORCE)
endif()
# Configure CMake
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
if(MSVC)
set(CMAKE_C_STANDARD 99)
else()
set(CMAKE_C_STANDARD 11)
endif()
set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_EXPORT_COMPILE_COMMANDS true)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
# Platform specific flags and definitions
if(MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MP")
elseif(APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -stdlib=libc++ -Wall -Wextra -Wno-inconsistent-missing-override")
set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64")
set(CMAKE_OSX_DEPLOYMENT_TARGET "12.0")
elseif(UNIX AND NOT APPLE AND NOT ANDROID)
add_definitions(
#-std=c++11
-DLINUX=1
)
endif()
# Disable JUCE extras and examples:
option(JUCE_BUILD_EXTRAS "Build JUCE Extras" OFF)
option(JUCE_BUILD_EXAMPLES "Build JUCE Examples" OFF)
# Disable SAF tests, but enable SAF examples:
option(SAF_BUILD_TESTS "Build SAF unit tests." OFF)
option(SAF_BUILD_EXAMPLES "Build SAF examples." ON)
option(SAF_ENABLE_SOFA_READER_MODULE "Required for binaural output plugins." ON)
# Add JUCE, Spatial_Audio_Framework, and VST2_SDK to the project
add_subdirectory(SDKs)
# Configure SPARTA plugins
option(BUILD_PLUGIN_FORMAT_VST2 "Build VST2 plugins" ON)
option(BUILD_PLUGIN_FORMAT_VST3 "Build VST3 plugins" OFF)
option(BUILD_PLUGIN_FORMAT_AU "Build AU plugins" OFF)
option(BUILD_PLUGIN_FORMAT_LV2 "Build LV2 plugins" OFF)
option(BUILD_PLUGIN_FORMAT_AAX "Build AAX plugins" OFF)
option(BUILD_PLUGIN_FORMAT_STANDALONE "Build standalone versions of the plugins" OFF)
add_subdirectory(audio_plugins)