-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
63 lines (50 loc) · 1.92 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
cmake_minimum_required(VERSION 3.16)
project(NegativeHarmony VERSION 0.0.1)
set(BaseTargetName NegativeHarmony)
set(TestTargetName NegativeHarmony_tests)
set(CMAKE_CXX_STANDARD 17)
#Post build is temporarily broken on Linux
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
set(postBuild FALSE)
else ()
set(postBuild TRUE)
endif ()
juce_add_plugin("${BaseTargetName}"
# VERSION ... # 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 "Horrorshow.io"
IS_SYNTH FALSE
NEEDS_MIDI_INPUT TRUE
NEEDS_MIDI_OUTPUT TRUE
IS_MIDI_EFFECT TRUE
EDITOR_WANTS_KEYBOARD_FOCUS FALSE
COPY_PLUGIN_AFTER_BUILD ${postBuild}
PLUGIN_MANUFACTURER "horrorshow.io"
PLUGIN_MANUFACTURER_CODE C137
PLUGIN_CODE NeHa
FORMATS AU VST3 Standalone
PRODUCT_NAME "To Negative Harmony")
juce_generate_juce_header(${BaseTargetName})
target_sources(${BaseTargetName} PRIVATE
Source/PluginProcessor.cpp
Source/PluginEditor.cpp
Source/MidiProcessor.cpp
Source/NegativeHarmony.cpp)
target_compile_definitions(${BaseTargetName}
PUBLIC
JUCE_WEB_BROWSER=0
JUCE_USE_CURL=0
JUCE_VST3_CAN_REPLACE_VST2=0)
target_link_libraries(${BaseTargetName} PRIVATE
juce::juce_audio_utils
juce::juce_recommended_config_flags
juce::juce_recommended_lto_flags
juce::juce_recommended_warning_flags)
# Now simply link against gtest or gtest_main as needed. Eg
add_executable(${TestTargetName} Test/NegativeHarmonyTest.cpp)
target_link_libraries(${TestTargetName} PRIVATE
${BaseTargetName}
gtest
gtest_main)
add_test(NAME ${BaseTargetName}_test COMMAND ${TestTargetName})