-
-
Notifications
You must be signed in to change notification settings - Fork 16
/
CMakeLists.txt
103 lines (86 loc) · 3.33 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
cmake_minimum_required(VERSION 3.15)
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.12" CACHE STRING "Minimum OS X deployment target")
project(ChowKick VERSION 1.2.0)
set(CMAKE_CXX_STANDARD 17)
# set default plugin formats to build
if(IOS)
set(JUCE_FORMATS Standalone AUv3)
option(CHOWKICK_BUILD_CLAP "Create a CLAP target for ChowKick" OFF)
option(CHOWKICK_BUILD_WITH_MTS "Link ChowKick with MTS" OFF)
else()
set(JUCE_FORMATS AU VST3 Standalone)
option(CHOWKICK_BUILD_CLAP "Create a CLAP target for ChowKick" ON)
option(CHOWKICK_BUILD_WITH_MTS "Link ChowKick with MTS" ON)
endif()
if (CHOWKICK_BUILD_CLAP AND (CMAKE_VERSION VERSION_LESS 3.21.0))
message(WARNING "CLAP builds require CMake version 3.21 or higher! To disable CLAP builds, run CMake configuration with \"-DCHOWKICK_BUILD_CLAP=OFF\"")
endif()
# Build LV2 only on Linux
if(UNIX AND NOT APPLE)
message(STATUS "Building LV2 plugin format")
list(APPEND JUCE_FORMATS LV2)
endif()
add_subdirectory(modules)
# Build VST2 is SDK set
# juce_set_vst2_sdk_path(C:/SDKs/VST_SDK/VST2_SDK)
if(TARGET juce_vst2_sdk)
message(STATUS "Building VST2 plugin format")
list(APPEND JUCE_FORMATS VST)
endif()
juce_add_plugin(ChowKick
COMPANY_NAME chowdsp
PLUGIN_MANUFACTURER_CODE Chow
PLUGIN_CODE Kik5
IS_SYNTH True
NEEDS_MIDI_INPUT True
FORMATS ${JUCE_FORMATS}
ProductName "ChowKick"
ICON_BIG res/logo.png
LV2URI http://github.com/Chowdhury-DSP/ChowKick
NEEDS_STORE_KIT TRUE
REQUIRES_FULL_SCREEN TRUE
IPHONE_SCREEN_ORIENTATIONS UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight
IPAD_SCREEN_ORIENTATIONS UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight
)
if(CHOWKICK_BUILD_CLAP)
clap_juce_extensions_plugin(
TARGET ChowKick
CLAP_ID "org.chowdsp.ChowKick"
CLAP_FEATURES instrument drum
CLAP_PROCESS_EVENTS_RESOLUTION_SAMPLES 64
CLAP_USE_JUCE_PARAMETER_RANGES DISCRETE
)
endif()
juce_generate_juce_header(ChowKick)
add_subdirectory(src)
include_directories(src)
add_subdirectory(res)
target_compile_definitions(ChowKick PUBLIC
JUCE_VST3_CAN_REPLACE_VST2=0
)
target_link_libraries(ChowKick PRIVATE juce_plugin_modules)
# we need these flags for notarization on MacOS
option(MACOS_RELEASE "Set build flags for MacOS Release" OFF)
if(MACOS_RELEASE)
message(STATUS "Setting MacOS release flags...")
set_target_properties(ChowKick_Standalone PROPERTIES
XCODE_ATTRIBUTE_ENABLE_HARDENED_RUNTIME YES)
endif()
if(IOS)
message(STATUS "Setting iOS-specific properties...")
foreach(target IN ITEMS BinaryData juce_plugin_modules ChowKick ChowKick_Standalone ChowKick_AUv3)
set_target_properties(${target}
PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "./"
ARCHIVE_OUTPUT_DIRECTORY "./"
LIBRARY_OUTPUT_DIRECTORY "./")
endforeach()
set_target_properties(ChowKick_Standalone PROPERTIES
XCODE_ATTRIBUTE_INSTALL_PATH "$(LOCAL_APPS_DIR)"
XCODE_ATTRIBUTE_SKIP_INSTALL "NO"
XCODE_ATTRIBUTE_ENABLE_IN_APP_PURCHASE "YES")
set_target_properties(ChowKick_AUv3 PROPERTIES
XCODE_ATTRIBUTE_INSTALL_PATH "$(LOCAL_APPS_DIR)/ChowKick.app/PlugIns"
XCODE_ATTRIBUTE_SKIP_INSTALL "NO"
XCODE_ATTRIBUTE_ENABLE_IN_APP_PURCHASE "YES")
endif()