-
Notifications
You must be signed in to change notification settings - Fork 42
/
Copy pathCMakeLists.txt
240 lines (177 loc) · 7.16 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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
# Copyright (C) 2017-2019, 2022 Alain Martin
#
# This file is part of FRUT.
#
# FRUT is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# FRUT is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with FRUT. If not, see <http://www.gnu.org/licenses/>.
cmake_minimum_required(VERSION 3.4)
if(NOT DEFINED JUCE_ROOT)
message(FATAL_ERROR "JUCE_ROOT must be defined")
endif()
get_filename_component(JUCE_ROOT "${JUCE_ROOT}" ABSOLUTE BASE_DIR "${CMAKE_BINARY_DIR}")
project(JUCE-4.3.1)
if(MSVC_VERSION GREATER 1929)
message(WARNING "Skipping JUCE-4.3.1 because none of its sub-projects supports the "
"\"Visual Studio 2022\" exporter"
)
return()
elseif(MSVC_VERSION GREATER 1919)
message(WARNING "Skipping JUCE-4.3.1 because none of its sub-projects supports the "
"\"Visual Studio 2019\" exporter"
)
return()
elseif(MSVC_VERSION GREATER 1909)
message(WARNING "Skipping JUCE-4.3.1 because none of its sub-projects supports the "
"\"Visual Studio 2017\" exporter"
)
return()
elseif(WIN32 AND NOT MSVC)
message(WARNING "Skipping JUCE-4.3.1 because none of its sub-projects supports the "
"\"Code::Blocks (Windows)\" exporter"
)
return()
elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL Linux
AND CMAKE_EXTRA_GENERATOR STREQUAL CodeBlocks)
message(WARNING "Skipping JUCE-4.3.1 because none of its sub-projects supports the "
"\"Code::Blocks (Linux)\" exporter"
)
return()
endif()
# All exporters
set(BlocksDrawing_jucer_FILE
"${JUCE_ROOT}/examples/BLOCKS/BlocksDrawing/BlocksDrawing.jucer"
)
add_subdirectory("examples/BLOCKS/BlocksDrawing")
set(BlocksMonitor_jucer_FILE
"${JUCE_ROOT}/examples/BLOCKS/BlocksMonitor/BlocksMonitor.jucer"
)
add_subdirectory("examples/BLOCKS/BlocksMonitor")
set(BlocksSynth_jucer_FILE "${JUCE_ROOT}/examples/BLOCKS/BlocksSynth/BlocksSynth.jucer")
add_subdirectory("examples/BLOCKS/BlocksSynth")
set(JuceDemo_jucer_FILE "${JUCE_ROOT}/examples/Demo/JuceDemo.jucer")
add_subdirectory("examples/Demo")
# All exporters but "Xcode (iOS)"
if(NOT IOS)
set(Plugin_Host_jucer_FILE "${JUCE_ROOT}/examples/audio plugin host/Plugin Host.jucer")
add_subdirectory("examples/audio plugin host")
set(Projucer_jucer_FILE "${JUCE_ROOT}/extras/Projucer/Projucer.jucer")
add_subdirectory("extras/Projucer")
endif()
# All exporters but "Visual Studio 2015"
if(NOT MSVC_VERSION EQUAL 1900)
set(NetworkGraphicsDemo_jucer_FILE
"${JUCE_ROOT}/examples/NetworkGraphicsDemo/NetworkGraphicsDemo.jucer"
)
add_subdirectory("examples/NetworkGraphicsDemo")
endif()
# All exporters but "Visual Studio 2013"
if(NOT MSVC_VERSION EQUAL 1800)
set(HelloWorld_jucer_FILE "${JUCE_ROOT}/examples/HelloWorld/HelloWorld.jucer")
add_subdirectory("examples/HelloWorld")
set(MidiTest_jucer_FILE "${JUCE_ROOT}/examples/MidiTest/MidiTest.jucer")
add_subdirectory("examples/MidiTest")
set(OSCReceiver_jucer_FILE "${JUCE_ROOT}/examples/OSCReceiver/OSCReceiver.jucer")
add_subdirectory("examples/OSCReceiver")
set(OSCSender_jucer_FILE "${JUCE_ROOT}/examples/OSCSender/OSCSender.jucer")
add_subdirectory("examples/OSCSender")
set(AudioPerformanceTest_jucer_FILE
"${JUCE_ROOT}/extras/AudioPerformanceTest/AudioPerformanceTest.jucer"
)
add_subdirectory("extras/AudioPerformanceTest")
endif()
# All exporters but "Xcode (iOS)" and "Visual Studio 2015"
if(NOT IOS AND NOT MSVC_VERSION EQUAL 1900)
set(BouncingBallWavetableDemo_jucer_FILE
"${JUCE_ROOT}/examples/BouncingBallWavetableDemo/BouncingBallWavetableDemo.jucer"
)
add_subdirectory("examples/BouncingBallWavetableDemo")
endif()
# All exporters but "Xcode (iOS)" and "Visual Studio 2013"
if(NOT IOS AND NOT MSVC_VERSION EQUAL 1800)
set(MPETest_jucer_FILE "${JUCE_ROOT}/examples/MPETest/MPETest.jucer")
add_subdirectory("examples/MPETest")
set(OSCMonitor_jucer_FILE "${JUCE_ROOT}/examples/OSCMonitor/OSCMonitor.jucer")
add_subdirectory("examples/OSCMonitor")
set(Surround_jucer_FILE "${JUCE_ROOT}/examples/PlugInSamples/Surround/Surround.jucer")
add_subdirectory("examples/PlugInSamples/Surround")
set(JuceDemoPlugin_jucer_FILE
"${JUCE_ROOT}/examples/audio plugin demo/JuceDemoPlugin.jucer"
)
add_subdirectory("examples/audio plugin demo")
set(UnitTestRunner_jucer_FILE "${JUCE_ROOT}/extras/UnitTestRunner/UnitTestRunner.jucer")
add_subdirectory("extras/UnitTestRunner")
endif()
# "Xcode (MacOSX)" and "Xcode (iOS)" exporters
if(APPLE)
set(AUv3Synth_jucer_FILE "${JUCE_ROOT}/examples/AUv3Synth/AUv3Synth.jucer")
add_subdirectory("examples/AUv3Synth")
set(AnimationAppExample_jucer_FILE
"${JUCE_ROOT}/examples/AnimationAppExample/AnimationAppExample.jucer"
)
add_subdirectory("examples/AnimationAppExample")
set(AudioAppExample_jucer_FILE
"${JUCE_ROOT}/examples/AudioAppExample/AudioAppExample.jucer"
)
add_subdirectory("examples/AudioAppExample")
set(OpenGLAppExample_jucer_FILE
"${JUCE_ROOT}/examples/OpenGLAppExample/OpenGLAppExample.jucer"
)
add_subdirectory("examples/OpenGLAppExample")
endif()
# "Xcode (MacOSX)" and "Visual Studio 2015" exporters
if((APPLE AND NOT IOS) OR MSVC_VERSION EQUAL 1900)
set(Arpeggiator_jucer_FILE
"${JUCE_ROOT}/examples/PlugInSamples/Arpeggiator/Arpeggiator.jucer"
)
add_subdirectory("examples/PlugInSamples/Arpeggiator")
set(GainPlugIn_jucer_FILE
"${JUCE_ROOT}/examples/PlugInSamples/GainPlugIn/GainPlugIn.jucer"
)
add_subdirectory("examples/PlugInSamples/GainPlugIn")
set(MultiOutSynth_jucer_FILE
"${JUCE_ROOT}/examples/PlugInSamples/MultiOutSynth/MultiOutSynth.jucer"
)
add_subdirectory("examples/PlugInSamples/MultiOutSynth")
set(NoiseGate_jucer_FILE
"${JUCE_ROOT}/examples/PlugInSamples/NoiseGate/NoiseGate.jucer"
)
add_subdirectory("examples/PlugInSamples/NoiseGate")
endif()
# "Xcode (MacOSX)" and "Visual Studio 2013" exporters
if((APPLE AND NOT IOS) OR MSVC_VERSION EQUAL 1800)
set(PluckedStringsDemo_jucer_FILE
"${JUCE_ROOT}/examples/PluckedStringsDemo/PluckedStringsDemo.jucer"
)
add_subdirectory("examples/PluckedStringsDemo")
set(SimpleFFTExample_jucer_FILE
"${JUCE_ROOT}/examples/SimpleFFTExample/SimpleFFTExample.jucer"
)
add_subdirectory("examples/SimpleFFTExample")
endif()
# "Xcode (MacOSX)" and "Linux Makefile" exporters
if((APPLE AND NOT IOS) OR CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux")
set(BinaryBuilder_jucer_FILE "${JUCE_ROOT}/extras/binarybuilder/BinaryBuilder.jucer")
add_subdirectory("extras/binarybuilder")
endif()
# "Xcode (MacOSX)" exporter only
if(APPLE AND NOT IOS)
set(ComponentTutorialExample_jucer_FILE
"${JUCE_ROOT}/examples/ComponentTutorialExample/ComponentTutorialExample.jucer"
)
add_subdirectory("examples/ComponentTutorialExample")
endif()
# No supported exporters
if(FALSE)
set(jucedll_jucer_FILE "${JUCE_ROOT}/extras/windows dll/jucedll.jucer")
add_subdirectory("extras/windows dll")
endif()