-
Notifications
You must be signed in to change notification settings - Fork 6
/
CMakeLists.txt
104 lines (89 loc) · 2.86 KB
/
CMakeLists.txt
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
cmake_minimum_required(VERSION 3.22) # JUCE requires CMake 3.22
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(CMAKE_OSX_ARCHITECTURES arm64 x86_64)
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "" FORCE)
endif()
set(PROJECT_NAME "RoomReverb")
set(PROJECT_VERSION "1.2.0")
project(${PROJECT_NAME} VERSION ${PROJECT_VERSION})
# include JUCE
add_subdirectory(Libs/JUCE)
# plugin formats to build
set(PLUGIN_FORMATS VST3 AU LV2) # Standalone Unity VST3 AU AUv3 AAX VST LV2
# plugin formats to build for iOS
if(CMAKE_SYSTEM_NAME STREQUAL "iOS")
set(PLUGIN_FORMATS Standalone AUv3)
endif()
juce_add_plugin(${PROJECT_NAME}
PLUGIN_NAME "Room Reverb"
PLUGIN_CODE "Errp"
PLUGIN_MANUFACTURER_CODE "Edsp"
COMPANY_NAME "ElephantDSP.com"
COMPANY_WEBSITE "https://www.ElephantDSP.com"
COMPANY_EMAIL "mail@ElephantDSP.com"
BUNDLE_ID "com.elephantdsp.roomreverb"
IS_SYNTH FALSE
NEEDS_MIDI_INPUT FALSE
NEEDS_MIDI_OUTPUT FALSE
IS_MIDI_EFFECT FALSE
FORMATS ${PLUGIN_FORMATS}
VST3_CATEGORIES "Fx" "Reverb"
AAX_CATEGORY "AAX_ePlugInCategory_Reverb"
AU_MAIN_TYPE "kAudioUnitType_Effect"
COPY_PLUGIN_AFTER_BUILD TRUE
EDITOR_WANTS_KEYBOARD_FOCUS FALSE
# iOS
MICROPHONE_PERMISSION_ENABLED TRUE
REQUIRES_FULL_SCREEN TRUE
IPHONE_SCREEN_ORIENTATIONS UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight
IPAD_SCREEN_ORIENTATIONS UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight
ICON_BIG "Assets/icon_large.png"
)
# clap format
if(NOT CMAKE_SYSTEM_NAME STREQUAL "iOS")
add_subdirectory(Libs/clap-juce-extensions EXCLUDE_FROM_ALL)
clap_juce_extensions_plugin(
TARGET ${PROJECT_NAME}
CLAP_ID "com.elephantdsp.roomreverb"
CLAP_FEATURES audio-effect reverb
)
endif()
# create Config.h file
configure_file(Config.h.in Config.h)
target_include_directories(${PROJECT_NAME}
PUBLIC
"${PROJECT_BINARY_DIR}"
)
# include Assets folder
add_subdirectory(Assets)
# include Source folder
add_subdirectory(Source)
# include Freeverb3 folder and add as include folder
add_subdirectory(Libs/Freeverb3)
target_include_directories(${PROJECT_NAME}
PRIVATE
"Libs/Freeverb3/"
)
# adds some preprocessor definitions for JUCE and freeverb
target_compile_definitions(${PROJECT_NAME}
PUBLIC
JUCE_WEB_BROWSER=0
JUCE_USE_CURL=0
JUCE_VST3_CAN_REPLACE_VST2=0
LIBFV3_FLOAT # needed for freeverb
)
# link libraries
target_link_libraries(${PROJECT_NAME}
PRIVATE
BinaryData
juce::juce_audio_processors
juce::juce_audio_utils
juce::juce_gui_basics
PUBLIC
juce::juce_recommended_config_flags
juce::juce_recommended_lto_flags
juce::juce_recommended_warning_flags
)