forked from hollance/TheKissOfShame
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
158 lines (130 loc) · 5.63 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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
cmake_minimum_required(VERSION 3.15)
project(TheKissOfShame VERSION "${ProjectVersion}")
# project description stuff
set(BaseTargetName TheKissOfShame)
set(PluginName "The Kiss Of Shame")
set(ProjectVersion 1.0)
include (FetchContent)
Set(FETCHCONTENT_QUIET FALSE) # shows detailed info when fetching from github
# attempt to build with multiple threads
set(CMAKE_EXPORT_COMPILE_COMMANDS TRUE)
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
if(APPLE)
# apple universal builds
set (CMAKE_OSX_DEPLOYMENT_TARGET "11.0" CACHE STRING "Minimum OS X deployment version" FORCE)
set (CMAKE_OSX_ARCHITECTURES "arm64;x86_64" CACHE INTERNAL "")
# dSYM files for Xcode release builds
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -g")
set(CMAKE_XCODE_ATTRIBUTE_GCC_GENERATE_DEBUGGING_SYMBOLS[variant=Release] "YES")
set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT[variant=Release] "dwarf-with-dsym")
set(CMAKE_XCODE_ATTRIBUTE_DEPLOYMENT_POSTPROCESSING[variant=Release] "YES")
endif()
FetchContent_Declare(
JUCE
GIT_REPOSITORY https://github.com/juce-framework/JUCE.git
GIT_TAG 7.0.11
GIT_PROGRESS TRUE
GIT_SHALLOW 1
)
FetchContent_MakeAvailable(JUCE)
juce_add_plugin("${BaseTargetName}"
VERSION "${ProjectVersion}" # Set this if the plugin version is different to the project version
# ICON_BIG ... # ICON_* arguments specify a path to an image file to use as an icon for the Standalone
# ICON_SMALL ...
COMPANY_NAME Infernal Love # Specify the name of the plugin's author
COMPANY_WEBSITE "https://github.com/hollance/TheKissOfShame"
COMPANY_EMAIL ""
IS_SYNTH FALSE # Is this a synth or an effect?
NEEDS_MIDI_INPUT FALSE # Does the plugin need midi input?
NEEDS_MIDI_OUTPUT FALSE # Does the plugin need midi output?
IS_MIDI_EFFECT FALSE # Is this plugin a MIDI effect?
COPY_PLUGIN_AFTER_BUILD TRUE # Should the plugin be installed to a default location after building? (will install into sensible locations for most platforms)
# VST3_COPY_DIR ""
# AU_COPY_DIR ""
# AAX_COPY_DIR ""
PLUGIN_MANUFACTURER_CODE ILov # A four-character manufacturer id with at least one upper-case character
PLUGIN_CODE Tkos # A unique four-character plugin id with exactly one upper-case character
# GarageBand 10.3 requires the first letter to be upper-case, and the remaining letters to be lower-case
FORMATS VST3 Standalone AU # The formats to build. Other valid formats are: AAX Unity VST AU AUv3. Enable AAX once you have the AAX SDK installed
PRODUCT_NAME "${PluginName}" # The name of the final executable, which can differ from the target name
)
# for AAX
# juce_set_aax_sdk_path("/aax_sdk")
juce_generate_juce_header("${BaseTargetName}")
# directories to include in the compilation
add_subdirectory(Source)
target_compile_features("${BaseTargetName}" PUBLIC cxx_std_20)
target_compile_definitions("${BaseTargetName}" PUBLIC
DONT_SET_USING_JUCE_NAMESPACE=1
JUCE_DISPLAY_SPLASH_SCREEN=0
JUCE_REPORT_APP_USAGE=0
JUCE_USE_FLAC=0
JUCE_USE_OGGVORBIS=0
JUCE_USE_MP3AUDIOFORMAT=0
JUCE_USE_LAME_AUDIO_FORMAT=0
JUCE_USE_WINDOWS_MEDIA_FORMAT=0
JUCE_VST3_CAN_REPLACE_VST2=0
JUCE_ENABLE_REPAINT_DEBUGGING=0
JUCE_COREGRAPHICS_RENDER_WITH_MULTIPLE_PAINT_CALLS=1
JUCE_COREGRAPHICS_DRAW_ASYNC=1
JUCE_USE_CURL=0
JUCE_LOAD_CURL_SYMBOLS_LAZILY=1
JUCE_STRICT_REFCOUNTEDPOINTER=1
JUCE_BUILD_EXTRAS=0
JUCE_BUILD_EXAMPLES=0
JUCE_WEB_BROWSER=0
JUCE_USE_WIN_WEBVIEW2=0
JUCE_USE_CAMERA=0)
juce_add_binary_data("${BaseTargetName}BinaryData" HEADER_NAME BinaryData.h NAMESPACE BinaryData SOURCES
Audio_Resources/Hiss.wav
Audio_Resources/LowLevelGrainNoise.wav
Audio_Resources/PinkNoise.wav
GUI_Resources/AgeKnob.png
GUI_Resources/BlendKnob.png
GUI_Resources/Bypass.png
GUI_Resources/Environments.png
GUI_Resources/Face.png
GUI_Resources/FaceWithReels.png
GUI_Resources/HissKnob.png
GUI_Resources/InputKnob.png
GUI_Resources/Link.png
GUI_Resources/OutputKnob.png
GUI_Resources/PrintThrough.png
GUI_Resources/ShameCross.png
GUI_Resources/ShameKnob.png
GUI_Resources/TapeType.png
GUI_Resources/VUMeterL.png
GUI_Resources/VUMeterR.png
GUI_Resources/Wheels.png
)
set_target_properties("${BaseTargetName}BinaryData" PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
# if you ever decide you'd like to support CLAP
# CLAP code does not get automatically copied with COPY_PLUGIN_AFTER_BUILD
# so manually copy it when uncommenting this
# FetchContent_Declare (clap-juce-extensions
# GIT_REPOSITORY https://github.com/free-audio/clap-juce-extensions.git
# GIT_TAG origin/main)
# FetchContent_MakeAvailable (clap-juce-extensions)
# clap_juce_extensions_plugin(TARGET "${BaseTargetName}"
# CLAP_ID "com.InfernalLove.KissOfShame"
# CLAP_FEATURES effect tape saturation audio-effect)
target_link_libraries("${BaseTargetName}"
PRIVATE
"${BaseTargetName}BinaryData"
juce_audio_basics
juce_audio_devices
juce_audio_formats
juce_audio_plugin_client
juce_audio_processors
juce_audio_utils
juce_core
juce_data_structures
juce_events
juce_graphics
juce_gui_basics
juce_gui_extra
juce_opengl
PUBLIC
juce::juce_recommended_config_flags
juce::juce_recommended_lto_flags
juce::juce_recommended_warning_flags)