forked from ffAudio/Frequalizer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
70 lines (60 loc) · 1.6 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
cmake_minimum_required(VERSION 3.13.0)
project(frequalizer VERSION 2.0.0)
add_subdirectory(lib/JUCE)
option(INSTALL_AFTER_BUILD "Automatically copy built plugins in system directories after build" OFF)
# useful for linting (i.e. `clangd`)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# check which formats we want to build
set(FORMATS "VST3")
if (APPLE)
list(APPEND FORMATS "AU")
endif()
# add the plugin targets
juce_add_plugin(frequalizer
COMPANY_NAME "teobe"
PLUGIN_MANUFACTURER_CODE "TEOB"
PLUGIN_CODE "FqOS"
FORMATS ${FORMATS}
VST3_CATEGORIES "Fx" "Analyzer" "EQ"
AU_MAIN_TYPE "kAudioUnitType_Effect"
COMPANY_WEBSITE "https://teobe.net"
COMPANY_EMAIL "info@teobe.net"
BUNDLE_ID "net.teobe.frequalizer"
PLUGIN_NAME "Frequalizer"
PRODUCT_NAME "Frequalizer"
)
# add the sources
target_sources(frequalizer
PRIVATE
src/FrequalizerEditor.cpp
src/FrequalizerProcessor.cpp
)
# add required flags
target_link_libraries(frequalizer
PRIVATE
# compiler flags
juce::juce_recommended_warning_flags
juce::juce_recommended_config_flags
juce::juce_recommended_lto_flags
# juce modules
juce::juce_opengl
juce::juce_dsp
juce::juce_audio_utils
)
target_compile_definitions(frequalizer
PUBLIC
JUCE_VST3_CAN_REPLACE_VST2=OFF
JUCE_WEB_BROWSER=OFF
)
set_target_properties(frequalizer
PROPERTIES
CXX_STANDARD 17
)
# setup the copying to the output folder
if(NOT INSTALL_AFTER_BUILD)
message("Installing to dist/")
foreach(FORMAT ${FORMATS})
set_target_properties(frequalizer_${FORMAT} PROPERTIES JUCE_PLUGIN_COPY_DIR ${CMAKE_SOURCE_DIR}/dist)
endforeach()
endif()
juce_enable_copy_plugin_step(frequalizer)