-
Notifications
You must be signed in to change notification settings - Fork 10
/
CMakeLists.txt
37 lines (31 loc) · 1.34 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
cmake_minimum_required(VERSION 2.6)
project(modal)
set(source_files modal/detectionfunctions/mq.cpp
modal/detectionfunctions/detectionfunctions.cpp
src/onsetdetection.cpp
src/exceptions.cpp)
set(include_files modal/detectionfunctions/mq.h
modal/detectionfunctions/detectionfunctions.h
src/onsetdetection.h
src/exceptions.h)
include_directories(modal/detectionfunctions src)
add_library(modal SHARED ${source_files})
target_link_libraries(modal m fftw3)
install(TARGETS modal LIBRARY DESTINATION lib)
install(FILES ${include_files} DESTINATION include/modal)
# ----------------------------------------------------------------------------
# Tests
# ----------------------------------------------------------------------------
if(BUILD_TESTS)
set(test_src src/onsetdetection.cpp
src/exceptions.cpp
modal/detectionfunctions/mq.cpp
modal/detectionfunctions/detectionfunctions.cpp
tests/cpp/tests.cpp
tests/cpp/test_detectionfunctions.cpp
tests/cpp/test_onsetdetection.cpp)
add_executable(tests ${test_src})
target_link_libraries(tests cppunit sndfile m fftw3)
else()
message("-- Not building tests. To change run CMake with -D BUILD_TESTS=yes")
endif()