-
Notifications
You must be signed in to change notification settings - Fork 198
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
43 lines (37 loc) · 1.33 KB
/
CMakeLists.txt
File metadata and controls
43 lines (37 loc) · 1.33 KB
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
include_guard()
cmake_minimum_required (VERSION 3.15...3.20)
# Add a build option for enabling examples
option(TE_ADD_EXAMPLES "Add the example targets" ON)
file(READ VERSION.md CURRENT_VERSION)
project(tracktion
VERSION ${CURRENT_VERSION}
DESCRIPTION
"High level data model and set of classes for building \
sequence based audio applications."
HOMEPAGE_URL "https://github.com/Tracktion/tracktion_engine"
)
# Only add JUCE if not already available from a parent project
if(NOT TARGET juce::juce_core)
if (JUCE_CPM_DEVELOP)
include(cmake/CPM.cmake)
CPMAddPackage("gh:juce-framework/JUCE#develop")
else()
add_subdirectory(modules/juce)
endif()
endif()
# Only register tracktion modules if not already defined
if(NOT TARGET tracktion_core)
add_subdirectory(modules)
else()
# Parent registered modules without tracktion:: namespace aliases.
# Create aliases so examples can link against tracktion::tracktion_engine etc.
if(NOT TARGET tracktion::tracktion_core)
add_library(tracktion::tracktion_core ALIAS tracktion_core)
add_library(tracktion::tracktion_engine ALIAS tracktion_engine)
add_library(tracktion::tracktion_graph ALIAS tracktion_graph)
endif()
endif()
if (TE_ADD_EXAMPLES)
enable_testing()
add_subdirectory(examples)
endif()