-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
74 lines (63 loc) · 1.9 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
# Mandatory line, sets the minimum version of CMake that should be used with this repository.
# I specified 3.22 because I trust it. However, currently I have 3.26 installed on my machine.
# To verify your version run
# $ cmake --version
cmake_minimum_required(VERSION 3.22)
# Sets a few variables, like PROJECT_NAME
project(Adc24Workshop)
# Always use the newest C++ standard on green-field projects if possible.
# Currently, JUCE supports only C++ 20 cross-platform.
set(CMAKE_CXX_STANDARD 20)
# I like to download the dependencies to the same folder as the project.
# If you want to install them system wide, set CPM_SOURCE_CACHE with the path to the dependencies
# either as an environment variable or pass it to the cmake script with -DCPM_SOURCE_CACHE=<path>.
set(LIB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/libs)
# Downloads CPM if not already downloaded. CPM is an easy-to-use package manager nicely integrated with CMake.
include(cmake/cpm.cmake)
include(cmake/CompilerWarnings.cmake)
include(cmake/Util.cmake)
# This commands downloads AND configures JUCE. It sets up some variables, like JUCE_SOURCE_DIR.
cpmaddpackage(
NAME
JUCE
GIT_TAG
8.0.3
VERSION
8.0.3
GITHUB_REPOSITORY
juce-framework/JUCE
SOURCE_DIR
${LIB_DIR}/juce
)
cpmaddpackage(
NAME
WOLFSOUND_DSP_UTILS
GITHUB_REPOSITORY
JanWilczek/wolfsound-dsp-utils
VERSION
0.1.1
SOURCE_DIR
${LIB_DIR}/wolfsound-dsp-utils
)
# Adds googletest.
cpmaddpackage(
NAME
GOOGLETEST
GITHUB_REPOSITORY
google/googletest
GIT_TAG
v1.15.2
VERSION
1.15.2
SOURCE_DIR
${LIB_DIR}/googletest
OPTIONS
"INSTALL_GTEST OFF"
"gtest_force_shared_crt ON"
)
# This command allows running tests from the "build" folder (the one where CMake generates the project to).
enable_testing()
# Adds all the targets configured in the "plugin" folder.
add_subdirectory(plugin)
# Adds all the targets configured in the "test" folder.
add_subdirectory(test)