forked from zynaddsubfx/zynaddsubfx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
76 lines (68 loc) · 2.54 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
70
71
72
73
74
75
cmake_minimum_required(VERSION 3.0)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/")
project(zynaddsubfx)
set(VERSION_MAJOR "3")
set(VERSION_MINOR "0")
set(VERSION_REVISION "7")
#Set data directory, if any
if(DEFINED ZYN_DATADIR)
add_definitions(-DZYN_DATADIR="${ZYN_DATADIR}")
endif()
option(ZYN_SYSTEM_RTOSC "Use system provided librtosc and librtosc-cpp" OFF)
#Include RTOSC
if(ZYN_SYSTEM_RTOSC)
include(FindPkgConfig)
pkg_check_modules(RTOSC REQUIRED librtosc)
pkg_check_modules(RTOSC_CPP REQUIRED librtosc-cpp)
include_directories(${RTOSC_INCLUDE_DIR})
message(STATUS "Found system provided librtosc and librtosc-cpp...")
else()
if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/rtosc/CMakeLists.txt")
message(STATUS "RTOSC NOT FOUND")
message(STATUS "Attempting to checkout submodule")
find_package(Git REQUIRED)
execute_process(COMMAND git submodule update --init --recursive)
if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/rtosc/CMakeLists.txt")
message(FATAL_ERROR "FAILED TO CHECKOUT RTOSC\n"
"please check file permissions and your network")
endif()
else()
message(STATUS "Found Rtosc Submodule...")
endif()
set(RTOSC_NO_INSTALL TRUE)
include("rtosc/cmake/ColorMessage.cmake")
add_subdirectory(rtosc)
include_directories(rtosc/include)
endif()
enable_testing()
include(CTestConfig.cmake)
#Currently the only directories that use cmake
add_subdirectory(src)
add_subdirectory(doc) # Doxygen only
install(FILES AUTHORS.txt COPYING README.adoc
DESTINATION share/doc/zynaddsubfx
)
install(FILES zynaddsubfx-jack-multi.desktop zynaddsubfx-jack.desktop zynaddsubfx-alsa.desktop zynaddsubfx-oss.desktop
DESTINATION share/applications)
install(FILES zynaddsubfx.svg
DESTINATION share/pixmaps)
install(FILES zynaddsubfx.png
DESTINATION share/pixmaps)
install(DIRECTORY instruments/banks
DESTINATION share/zynaddsubfx)
if(DEFINED ZYN_EXAMPLESDIR)
install(DIRECTORY instruments/examples
DESTINATION ${ZYN_EXAMPLESDIR})
else()
install(DIRECTORY instruments/examples
DESTINATION share/zynaddsubfx)
endif()
install(DIRECTORY instruments/ZynAddSubFX.lv2presets
DESTINATION ${PluginLibDir}/lv2)
## uninstall target
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/cmake/cmake_uninstall.cmake"
IMMEDIATE @ONLY)
add_custom_target(uninstall
"${CMAKE_COMMAND}" -P
"${CMAKE_CURRENT_BINARY_DIR}/cmake/cmake_uninstall.cmake")