summaryrefslogtreecommitdiff
path: root/skip/zynaddsubfx/zynaddsubfx-3.0.6-system_rtosc.patch
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-06-04 15:08:04 +0100
committerdavidovski <david@davidovski.xyz>2022-06-04 15:08:04 +0100
commit873665024ebfaa761ee49b508a79db7178aeb778 (patch)
tree6cd3b4ce3a9f4b0586ffa48e73a6ba4c8da2db43 /skip/zynaddsubfx/zynaddsubfx-3.0.6-system_rtosc.patch
parent4445f6e15185f58dc599390ab74df3ca19b437b7 (diff)
added gnupg
Diffstat (limited to 'skip/zynaddsubfx/zynaddsubfx-3.0.6-system_rtosc.patch')
-rw-r--r--skip/zynaddsubfx/zynaddsubfx-3.0.6-system_rtosc.patch92
1 files changed, 92 insertions, 0 deletions
diff --git a/skip/zynaddsubfx/zynaddsubfx-3.0.6-system_rtosc.patch b/skip/zynaddsubfx/zynaddsubfx-3.0.6-system_rtosc.patch
new file mode 100644
index 0000000..799ff8e
--- /dev/null
+++ b/skip/zynaddsubfx/zynaddsubfx-3.0.6-system_rtosc.patch
@@ -0,0 +1,92 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 5c708574..ef17dbd3 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -10,24 +10,34 @@ 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(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(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(FATAL_ERROR "FAILED TO CHECKOUT RTOSC\n"
+- "please check file permissions and your network")
++ 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()
+-else()
+- message(STATUS "Found Rtosc Submodule...")
+-endif()
+
+-set(RTOSC_NO_INSTALL TRUE)
+-include("rtosc/cmake/ColorMessage.cmake")
+-add_subdirectory(rtosc)
+-include_directories(rtosc/include)
++ set(RTOSC_NO_INSTALL TRUE)
++ include("rtosc/cmake/ColorMessage.cmake")
++ add_subdirectory(rtosc)
++ include_directories(rtosc/include)
++endif()
+
+ enable_testing()
+ include(CTestConfig.cmake)
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 2900f4b7..8348df70 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -575,13 +575,27 @@ else()
+ set(PTHREAD_LIBRARY pthread)
+ endif()
+
+-target_link_libraries(zynaddsubfx_core
+- ${ZLIB_LIBRARIES}
+- ${FFTW3F_LIBRARIES}
+- ${MXML_LIBRARIES}
+- ${OS_LIBRARIES}
+- ${PTHREAD_LIBRARY}
+- rtosc rtosc-cpp)
++if(ZYN_SYSTEM_RTOSC)
++ target_link_libraries(zynaddsubfx_core
++ ${ZLIB_LIBRARIES}
++ ${FFTW3F_LIBRARIES}
++ ${MXML_LIBRARIES}
++ ${OS_LIBRARIES}
++ ${PTHREAD_LIBRARY}
++ ${RTOSC_LIBRARIES}
++ ${RTOSC_CPP_LIBRARIES}
++ )
++else()
++ target_link_libraries(zynaddsubfx_core
++ ${ZLIB_LIBRARIES}
++ ${FFTW3F_LIBRARIES}
++ ${MXML_LIBRARIES}
++ ${OS_LIBRARIES}
++ ${PTHREAD_LIBRARY}
++ rtosc
++ rtosc-cpp
++ )
++endif()
+
+ if(IwyuErr)
+ message (STATUS "Include what you use: ${IwyuErr}")