summaryrefslogtreecommitdiff
path: root/media-gfx/freecad/files/freecad-0.19.2-0006-add-boost-serialization-to-find_package.patch
blob: f9120e0519191c0d6fba26081f390bf3c28acea2 (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
From fc4ae2ff217c67eae39947ed6b655b8afaa83859 Mon Sep 17 00:00:00 2001
From: Bernd Waibel <waebbl-gentoo@posteo.net>
Date: Sun, 20 Jun 2021 15:38:45 +0200
Subject: [PATCH] add boost::serialization to find_package

Swaps SetupBoost() after SetupSalomeSMESH() has been called.
SetupSalomeSMESH() looks for vtk, which searches for boost::serialization
overriding the default libraries detected by SetupBoost().

Signed-off-by: Bernd Waibel <waebbl-gentoo@posteo.net>
---
 CMakeLists.txt                         | 4 +++-
 cMake/FreeCAD_Helpers/SetupBoost.cmake | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5b17736..c241ebe 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -45,7 +45,6 @@ if(NOT FREECAD_LIBPACK_USE OR FREECAD_LIBPACK_CHECKFILE_CLBUNDLER)
     SetupPython()
     SetupPCL()
     SetupPybind11()
-    SetupBoost()
     SetupXercesC()
     find_package(ZLIB REQUIRED)
     find_package(PyCXX REQUIRED)
@@ -57,6 +56,9 @@ if(NOT FREECAD_LIBPACK_USE OR FREECAD_LIBPACK_CHECKFILE_CLBUNDLER)
         SetupOpenGL()
     endif(BUILD_GUI)
     SetupSalomeSMESH()
+    # needs to be called after SMESH which pulls in VTK, which only add boost::serialization
+    # overriding the values of SetupBoost()
+    SetupBoost()
     if (BUILD_FEM_NETGEN)
         find_package(NETGEN)
     endif(BUILD_FEM_NETGEN)
diff --git a/cMake/FreeCAD_Helpers/SetupBoost.cmake b/cMake/FreeCAD_Helpers/SetupBoost.cmake
index 76c6d64..77c415b 100644
--- a/cMake/FreeCAD_Helpers/SetupBoost.cmake
+++ b/cMake/FreeCAD_Helpers/SetupBoost.cmake
@@ -3,7 +3,7 @@ macro(SetupBoost)
 
     set(_boost_TEST_VERSIONS ${Boost_ADDITIONAL_VERSIONS})
 
-    set (BOOST_COMPONENTS filesystem program_options regex system thread)
+    set (BOOST_COMPONENTS filesystem program_options regex serialization system thread)
     find_package(Boost ${BOOST_MIN_VERSION}
         COMPONENTS ${BOOST_COMPONENTS} REQUIRED)
 
-- 
2.32.0