forked from zynaddsubfx/zynaddsubfx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
64 lines (57 loc) · 2.06 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
cmake_minimum_required(VERSION 2.8)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/")
project(zynaddsubfx)
set(VERSION_MAJOR "3")
set(VERSION_MINOR "0")
set(VERSION_REVISION "5")
#Set data directory, if any
if(DEFINED ZYN_DATADIR)
add_definitions(-DZYN_DATADIR="${ZYN_DATADIR}")
endif()
#Include RTOSC
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)
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)
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 HISTORY.txt 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(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")