-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
104 lines (89 loc) · 3.18 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
cmake_minimum_required (VERSION 3.10)
project (Metronome)
set (CMAKE_INCLUDE_CURRENT_DIR ON)
set (CMAKE_AUTOMOC ON)
set (CMAKE_AUTORCC ON)
set (CMAKE_CXX_STANDARD 14)
set (CMAKE_CXX_STANDARD_REQUIRED ON)
find_package (Qt5 COMPONENTS Core Quick REQUIRED)
IF (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
find_library (COCOA_LIBRARY Cocoa REQUIRED)
find_library (IOKIT_LIBRARY IOKit REQUIRED)
find_library (ACCEL_LIBRARY Accelerate REQUIRED)
find_library (COREAUDIO_LIBRARY CoreAudio REQUIRED)
find_library (COREMIDI_LIBRARY CoreMIDI REQUIRED)
find_library (AUDIOTB_LIBRARY AudioToolbox REQUIRED)
set (JUCE_SOURCES
"JuceLibraryCode/include_juce_audio_basics.mm"
"JuceLibraryCode/include_juce_audio_devices.mm"
"JuceLibraryCode/include_juce_core.mm"
"JuceLibraryCode/include_juce_events.mm"
)
add_definitions(-DMACOSX_DEPLOYMENT_TARGET=10.10)
ENDIF (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
IF (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set (JUCE_SOURCES
"JuceLibraryCode/include_juce_audio_basics.cpp"
"JuceLibraryCode/include_juce_audio_devices.cpp"
"JuceLibraryCode/include_juce_core.cpp"
"JuceLibraryCode/include_juce_events.cpp"
)
add_compile_definitions (
JUCE_ALSA=1
JUCE_INCLUDE_ZLIB_CODE=1
)
ENDIF (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set (SOURCES
"r8brain-free-src/pffft.cpp"
"r8brain-free-src/r8bbase.cpp"
"ClickSample.cpp"
"Metronome.cpp"
"Main.cpp"
"Qml/qml.qrc"
)
set (HEADERS
"r8brain-free-src/CDSPBlockConvolver.h"
"r8brain-free-src/CDSPFIRFilter.h"
"r8brain-free-src/CDSPFracInterpolator.h"
"r8brain-free-src/CDSPHBDownsampler.h"
"r8brain-free-src/CDSPHBUpsampler.h"
"r8brain-free-src/CDSPProcessor.h"
"r8brain-free-src/CDSPRealFFT.h"
"r8brain-free-src/CDSPResampler.h"
"r8brain-free-src/CDSPSincFilterGen.h"
"r8brain-free-src/fft4g.h"
"r8brain-free-src/pffft.h"
"r8brain-free-src/r8bbase.h"
"r8brain-free-src/r8bconf.h"
"r8brain-free-src/r8butil.h"
"JuceLibraryCode/AppConfig.h"
"JuceLibraryCode/JuceHeader.h"
"JUCE/juce_audio_basics/juce_audio_basics.h"
"JUCE/juce_audio_devices/juce_audio_devices.h"
"JUCE/juce_core/juce_core.h"
"JUCE/juce_events/juce_events.h"
"JUCE/juce_data_structures/juce_data_structures.h"
"Metronome.h"
)
add_executable (${PROJECT_NAME} MACOSX_BUNDLE ${JUCE_SOURCES} ${SOURCES})
target_include_directories (${PROJECT_NAME} PRIVATE
"JuceLibraryCode"
"JUCE"
)
IF (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
target_link_libraries (${PROJECT_NAME} PRIVATE
${COCOA_LIBRARY}
${IOKIT_LIBRARY}
${ACCEL_LIBRARY}
${COREAUDIO_LIBRARY}
${COREMIDI_LIBRARY}
${AUDIOTB_LIBRARY}
Qt5::Core Qt5::Quick
)
ENDIF (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
IF (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
target_link_libraries (${PROJECT_NAME}
rt dl pthread asound
Qt5::Core Qt5::Quick
)
ENDIF (${CMAKE_SYSTEM_NAME} MATCHES "Linux")