-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
53 lines (40 loc) · 1.32 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(StompBox VERSION 0.0.1)
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED OFF)
set(CMAKE_CXX_EXTENSIONS OFF)
if (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
include_directories(SYSTEM /usr/local/include)
elseif (CMAKE_SYSTEM_NAME STREQUAL "Linux")
elseif (CMAKE_SYSTEM_NAME STREQUAL "Windows")
add_compile_definitions(NOMINMAX WIN32_LEAN_AND_MEAN)
else()
message(FATAL_ERROR "Unrecognized Platform!")
endif()
set(STOMPBOX_DEPS_PATH "${CMAKE_CURRENT_SOURCE_DIR}/Dependencies")
add_subdirectory(stompbox)
file(MAKE_DIRECTORY build/stompbox)
add_custom_target(copy_library ALL
${CMAKE_COMMAND} -E copy "$<TARGET_FILE:stompbox>" stompbox/
DEPENDS stompbox
)
if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
find_library(JACK_LIB
NAMES libjack64.lib
PATHS C:/Program\ Files/JACK2/lib)
else()
find_library(JACK_LIB libjack.so)
link_libraries(stdc++fs pthread)
endif()
if(JACK_LIB)
message("Jack library found - stombox-jack will be built")
add_subdirectory(stompbox-jack)
file(MAKE_DIRECTORY build/stompbox-jack)
add_custom_target(copy_binaries ALL
${CMAKE_COMMAND} -E copy "$<TARGET_FILE:stompbox-jack>" stompbox-jack/
DEPENDS stompbox-jack
)
else()
message("Jack library not found - stombox-jack will not be built")
endif()