1 cmake_minimum_required(VERSION 2.8)
2 set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/")
6 set(VERSION_REVISION "5")
8 #Set data directory, if any
9 if(DEFINED ZYN_DATADIR)
10 add_definitions(-DZYN_DATADIR="${ZYN_DATADIR}")
14 if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/rtosc/CMakeLists.txt")
15 message(STATUS "RTOSC NOT FOUND")
16 message(STATUS "Attempting to checkout submodule")
17 find_package(Git REQUIRED)
18 execute_process(COMMAND git submodule update --init)
19 if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/rtosc/CMakeLists.txt")
20 message(FATAL_ERROR "FAILED TO CHECKOUT RTOSC\n"
21 "please check file permissions and your network")
24 message(STATUS "Found Rtosc Submodule...")
27 set(RTOSC_NO_INSTALL TRUE)
28 include("rtosc/cmake/ColorMessage.cmake")
29 add_subdirectory(rtosc)
30 include_directories(rtosc/include)
33 include(CTestConfig.cmake)
34 #Currently the only directories that use cmake
36 add_subdirectory(doc) # Doxygen only
38 install(FILES AUTHORS.txt COPYING HISTORY.txt README.adoc
39 DESTINATION share/doc/zynaddsubfx
41 install(FILES zynaddsubfx-jack-multi.desktop zynaddsubfx-jack.desktop zynaddsubfx-alsa.desktop zynaddsubfx-oss.desktop
42 DESTINATION share/applications)
43 install(FILES zynaddsubfx.svg
44 DESTINATION share/pixmaps)
45 install(DIRECTORY instruments/banks
46 DESTINATION share/zynaddsubfx)
47 if(DEFINED ZYN_EXAMPLESDIR)
48 install(DIRECTORY instruments/examples
49 DESTINATION ${ZYN_EXAMPLESDIR})
51 install(DIRECTORY instruments/examples
52 DESTINATION share/zynaddsubfx)
54 install(DIRECTORY instruments/ZynAddSubFX.lv2presets
55 DESTINATION ${PluginLibDir}/lv2)
58 configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in"
59 "${CMAKE_CURRENT_BINARY_DIR}/cmake/cmake_uninstall.cmake"
61 add_custom_target(uninstall
63 "${CMAKE_CURRENT_BINARY_DIR}/cmake/cmake_uninstall.cmake")