-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
132 lines (119 loc) · 3.32 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
cmake_minimum_required(VERSION 3.22)
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.13" CACHE STRING "Minimum OS X deployment target")
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
project(Bombaz VERSION 1.0.0 LANGUAGES CXX)
set_property(GLOBAL PROPERTY USE_FOLDERS YES)
option(JUCE_ENABLE_MODULE_SOURCE_GROUPS "Enable Module Source Groups" ON)
find_package(JUCE CONFIG REQUIRED)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_STANDARD 20)
# generate PDB/dSYM files for the Release build
if(MSVC)
add_compile_options("$<$<NOT:$<CONFIG:Debug>>:/Zi>")
add_link_options("$<$<NOT:$<CONFIG:Debug>>:/DEBUG>")
add_link_options("$<$<NOT:$<CONFIG:Debug>>:/OPT:REF>")
add_link_options("$<$<NOT:$<CONFIG:Debug>>:/OPT:ICF>")
else()
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()
if(MSVC)
add_compile_options("/W4")
else()
add_compile_options(
-Wall
-Wbool-conversion
-Wcast-align
-Wconditional-uninitialized
-Wconstant-conversion
-Wconversion
-Wdeprecated
-Wextra-semi
-Wno-float-equal
-Winconsistent-missing-destructor-override
-Wint-conversion
-Wmissing-field-initializers
-Wmissing-prototypes
-Wno-ignored-qualifiers
-Wnullable-to-nonnull-conversion
-Woverloaded-virtual
-Wpedantic
-Wreorder
-Wshadow-all
-Wshift-sign-overflow
-Wshorten-64-to-32
-Wsign-compare
-Wno-sign-conversion
-Wstrict-aliasing
-Wswitch-enum
-Wuninitialized
-Wunreachable-code
-Wunused-parameter
-Wunused-private-field
-Wzero-as-null-pointer-constant
)
endif()
juce_add_plugin(${PROJECT_NAME}
COMPANY_NAME "audiodev.blog"
PLUGIN_MANUFACTURER_CODE Dvbl
PLUGIN_CODE Bbaz
BUNDLE_ID "blog.audiodev.bombaz"
IS_SYNTH TRUE
NEEDS_MIDI_INPUT TRUE
NEEDS_MIDI_OUTPUT FALSE
IS_MIDI_EFFECT FALSE
EDITOR_WANTS_KEYBOARD_FOCUS FALSE
COPY_PLUGIN_AFTER_BUILD TRUE
FORMATS AU VST3 Standalone
PRODUCT_NAME "Bombaz"
)
juce_generate_juce_header(${PROJECT_NAME})
target_sources(${PROJECT_NAME} PRIVATE
src/DCBlockFilter.h
src/DSP.h
src/LookAndFeel.cpp
src/LookAndFeel.h
src/Oscillator.h
src/Parameters.cpp
src/Parameters.h
src/PluginEditor.cpp
src/PluginEditor.h
src/PluginProcessor.cpp
src/PluginProcessor.h
src/Synth.cpp
src/Synth.h
src/Voice.h
src/XYPad.cpp
src/XYPad.h
)
juce_add_binary_data(BinaryData SOURCES
resources/Background.png
resources/LineHorz.png
resources/LineVert.png
resources/Off0.png
resources/Off1.png
resources/Off2.png
resources/On0.png
resources/On1.png
resources/On2.png
resources/Pointer.png
)
target_compile_definitions(${PROJECT_NAME} PUBLIC
JUCE_WEB_BROWSER=0
JUCE_USE_CURL=0
JUCE_VST3_CAN_REPLACE_VST2=0
JUCE_REPORT_APP_USAGE=0
JUCE_MODAL_LOOPS_PERMITTED=0
DONT_SET_USING_JUCE_NAMESPACE=1
)
target_link_libraries(${PROJECT_NAME}
PRIVATE
BinaryData
juce::juce_audio_utils
juce::juce_dsp
PUBLIC
juce::juce_recommended_config_flags
juce::juce_recommended_lto_flags
)