This repository has been archived by the owner on Feb 27, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
69 lines (57 loc) · 1.92 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
cmake_minimum_required(VERSION 3.7)
project(softcut)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
# hmm...
message("CMAKE_C_FLAGS_DEBUG is ${CMAKE_C_FLAGS_DEBUG}")
message("CMAKE_C_FLAGS_RELEASE is ${CMAKE_C_FLAGS_RELEASE}")
message("CMAKE_C_FLAGS_RELWITHDEBINFO is ${CMAKE_C_FLAGS_RELWITHDEBINFO}")
message("CMAKE_C_FLAGS_MINSIZEREL is ${CMAKE_C_FLAGS_MINSIZEREL}")
set (SRC
src/softcut-main.cpp
src/SoftCut.cpp
src/SoftCutVoice.cpp
src/SoftCutHead.cpp
src/SubHead.cpp
src/Commands.cpp
src/OscInterface.cpp
src/Resampler.h
src/Svf.cpp
src/SoftClip.h
src/Types.h
src/Utilities.h src/FadeCurves.cpp src/FadeCurves.h src/TestBuffers.cpp src/TestBuffers.h)
if(UNIX)
if(APPLE)
list (APPEND SRC src/PaWrapper.cpp)
else()
list (APPEND SRC src/JackWrapper.cpp)
endif()
else()
# nope
endif()
add_executable(softcut ${SRC})
if(UNIX)
if(APPLE)
find_library(coreaudio_lib CoreAudio REQUIRED)
find_library(audiotoolbox_lib AudioToolbox REQUIRED)
find_library(audiounit_lib AudioUnit REQUIRED)
find_library(carbon_lib Carbon REQUIRED)
find_library(lo_lib liblo.dylib REQUIRED)
find_library(portaudio_lib portaudio.a REQUIRED)
include_directories(softcut /usr/local/include)
target_link_libraries( softcut ${coreaudio_lib} ${audiotoolbox_lib} ${audiounit_lib} ${carbon_lib} ${portaudio_lib})
else()
find_library(lo_lib liblo.so REQUIRED)
target_link_libraries(softcut jack)
target_link_libraries(softcut pthread)
target_link_libraries(softcut asound)
endif()
else()
# nope
endif()
target_link_libraries(softcut ${lo_lib})
set_target_properties(softcut PROPERTIES
CXX_STANDARD 14
CXX_STANDARD_REQUIRED YES
CXX_EXTENSIONS YES
)
target_compile_options(softcut PRIVATE -Wall -Wextra -pedantic)