summaryrefslogtreecommitdiff
path: root/libre/supercollider/use-system-boost.patch
blob: 0c69eb438946b1e251d0d31cbef9f65a8d0cbae7 (plain)
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
diff -ruN a/editors/sc-ide/CMakeLists.txt b/editors/sc-ide/CMakeLists.txt
--- a/editors/sc-ide/CMakeLists.txt	2018-09-25 01:20:49.000000000 +0200
+++ b/editors/sc-ide/CMakeLists.txt	2018-11-28 15:53:19.827910183 +0100
@@ -219,7 +219,6 @@
 include_directories(${CMAKE_SOURCE_DIR}/include/common)
 include_directories(${CMAKE_SOURCE_DIR}/common)
 include_directories(${CMAKE_SOURCE_DIR}/include/plugin_interface)
-include_directories(${CMAKE_SOURCE_DIR}/external_libraries/boost)
 include_directories(${YAMLCPP_INCLUDE_DIR})
 # For QtCollider headers:
 include_directories(${CMAKE_SOURCE_DIR})
@@ -304,6 +303,7 @@
 else()
     # in-house-built boost system
     target_link_libraries( SuperCollider boost_system boost_filesystem )
+    include_directories(${CMAKE_SOURCE_DIR}/external_libraries/boost)
 endif()
 
 if(APPLE)
diff -ruN a/external_libraries/CMakeLists.txt b/external_libraries/CMakeLists.txt
--- a/external_libraries/CMakeLists.txt	2018-08-28 03:12:47.000000000 +0200
+++ b/external_libraries/CMakeLists.txt	2018-11-28 17:39:57.981205691 +0100
@@ -74,6 +74,14 @@
         PROPERTY FOLDER 3rdparty
     )
 
+  #oscpack
+  add_library(oscpack STATIC EXCLUDE_FROM_ALL "oscpack_build.cpp")
+  target_include_directories(oscpack PRIVATE boost)
+  target_include_directories(oscpack INTERFACE oscpack_1_1_0 )
+else()
+  #oscpack
+  add_library(oscpack STATIC EXCLUDE_FROM_ALL "oscpack_build.cpp")
+  target_include_directories(oscpack INTERFACE oscpack_1_1_0 )
 endif()
 
 # tlsf
@@ -82,11 +90,6 @@
 target_include_directories( tlsf INTERFACE TLSF-2.4.6/src )
 set_property(TARGET tlsf PROPERTY POSITION_INDEPENDENT_CODE TRUE)
 
-#oscpack
-add_library(oscpack STATIC EXCLUDE_FROM_ALL "oscpack_build.cpp")
-target_include_directories(oscpack PRIVATE boost)
-target_include_directories(oscpack INTERFACE oscpack_1_1_0 )
-
 
 if(LTO)
 	set_property(TARGET oscpack tlsf
@@ -104,7 +107,11 @@
   CREATE_FINAL_FILE(${CMAKE_CURRENT_BINARY_DIR}/libyamlcpp.cpp ${yaml_src})
 
   add_library(yaml STATIC EXCLUDE_FROM_ALL ${CMAKE_CURRENT_BINARY_DIR}/libyamlcpp.cpp)
-  target_include_directories(yaml PUBLIC ${CMAKE_SOURCE_DIR}/external_libraries/yaml-cpp/include boost)
+  if(Boost_FOUND)
+    target_include_directories(yaml PUBLIC ${Boost_INCLUDE_DIRS})
+  else()
+    target_include_directories(yaml PUBLIC ${CMAKE_SOURCE_DIR}/external_libraries/yaml-cpp/include boost)
+  endif()
   set_property( TARGET yaml PROPERTY FOLDER 3rdparty )
   set(YAMLCPP_LIBRARY yaml)
   set(YAMLCPP_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/external_libraries/yaml-cpp/include)
diff -ruN a/testsuite/server/CMakeLists.txt b/testsuite/server/CMakeLists.txt
--- a/testsuite/server/CMakeLists.txt	2018-08-28 03:12:47.000000000 +0200
+++ b/testsuite/server/CMakeLists.txt	2018-11-28 16:24:08.449255929 +0100
@@ -5,4 +5,8 @@
 endif()
 
 add_library(boost_test STATIC boost_test.cpp)
-target_include_directories(boost_test PUBLIC ${CMAKE_SOURCE_DIR}/external_libraries/boost)
+if (Boost_FOUND)
+  target_include_directories(boost_test PUBLIC ${Boost_INCLUDE_DIRS})
+else()
+  target_include_directories(boost_test PUBLIC ${CMAKE_SOURCE_DIR}/external_libraries/boost)
+endif()