File: 0009-Explicitly-link-with-relevant-boost-libraries.patch

package info (click to toggle)
libosl 0.8.0-4.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,328 kB
  • sloc: cpp: 114,345; ruby: 1,290; ansic: 915; makefile: 431; perl: 309; sh: 35
file content (41 lines) | stat: -rw-r--r-- 1,462 bytes parent folder | download | duplicates (2)
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
From 9a7b68ffce6c5d8a90b60a8c489a34816decdebf Mon Sep 17 00:00:00 2001
From: Yann Dirson <ydirson@free.fr>
Date: Fri, 10 Jul 2020 23:45:58 +0200
Subject: [PATCH 09/11] Explicitly link with relevant boost libraries

---
 CMakeLists.txt | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index bd9033c0c..12d5312ee 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -85,9 +85,9 @@ include_directories ("${PROJECT_SOURCE_DIR}/full")
 #set (Boost_USE_STATIC_LIBS ON)
 set (Boost_USE_MULTITHREADED ON)
 if (MINGW)
-  find_package (Boost 1.54.0)
+  find_package (Boost 1.54.0 COMPONENTS date_time filesystem serialization iostreams system)
 else()
-  find_package (Boost)
+  find_package (Boost COMPONENTS date_time filesystem serialization iostreams system)
 endif()
 if (Boost_FOUND)
   include_directories (${Boost_INCLUDE_DIRS})
@@ -115,6 +115,12 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
   set_target_properties(osl PROPERTIES
                             VERSION 1.0.0
                             SOVERSION 1)
+  target_link_libraries (osl ${Boost_DATE_TIME_LIBRARY})
+  target_link_libraries (osl ${Boost_FILESYSTEM_LIBRARY})
+  target_link_libraries (osl ${Boost_SERIALIZATION_LIBRARY})
+  target_link_libraries (osl ${Boost_IOSTREAMS_LIBRARY})
+  target_link_libraries (osl ${Boost_SYSTEM_LIBRARY})
+  target_link_libraries (osl pthread)
 endif()
 
 install(TARGETS osl osl-static
-- 
2.33.0