-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
54 lines (41 loc) · 1 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
cmake_minimum_required(VERSION 3.10)
project(Harmonizer)
# User set variables
# ...
set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
# Add third party
add_subdirectory(third_party/)
set(HARMONIZER_SOURCES
src/harmonizer_dsp.c
src/pitch_detection.cc
src/fourier.c
src/math_utils.c
src/harmonizer_app.cc
src/harmonizer_midi.cc
src/jack_backend.c
src/main.cc
)
# Visualizer
if (SDL2_FOUND)
message(STATUS "SDL2 detected, building visualizer")
add_definitions(-DVISUALIZER)
list(APPEND HARMONIZER_SOURCES
src/visualizer.c)
endif(SDL2_FOUND)
add_executable(harmonizer
${HARMONIZER_SOURCES}
)
include_directories(${THIRD_PARTY_INCLUDES})
add_dependencies(harmonizer ${THIRD_PARTY_DEPENDENCIES})
target_link_libraries(harmonizer
m
jack
asound
${THIRD_PARTY_LIBRARIES})
# Alsa
find_package(ALSA REQUIRED)
if (ALSA_FOUND)
target_link_libraries(harmonizer ${ALSA_LIBRARIES})
endif(ALSA_FOUND)