vp-build/srcpkgs/freecad/patches/020-boost-1.68.patch

40 lines
1.7 KiB
Diff

From 3c9e6b038ed544e446c61695dab62f83e781a28a Mon Sep 17 00:00:00 2001
From: wmayer <wmayer@users.sourceforge.net>
Date: Sat, 21 Apr 2018 11:12:45 +0200
Subject: [PATCH] fix requesting boost python component for version >= 1.67.0
---
src/Mod/Path/libarea/CMakeLists.txt | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git src/Mod/Path/libarea/CMakeLists.txt src/Mod/Path/libarea/CMakeLists.txt
index ef95c29d37d..dd03a39a797 100644
--- src/Mod/Path/libarea/CMakeLists.txt
+++ src/Mod/Path/libarea/CMakeLists.txt
@@ -16,13 +16,19 @@ OPTION(USE_BOOST_PYTHON "use BOOST_PYTHON, otherwise use PYBIND11" ON)
if(USE_BOOST_PYTHON)
if(NOT FREECAD_LIBPACK_USE OR FREECAD_LIBPACK_CHECKFILE_CLBUNDLER)
- if(NOT PYTHON_VERSION_MAJOR LESS 3)
- find_package( Boost COMPONENTS python3)
- if (NOT Boost_PYTHON3_FOUND)
- find_package( Boost COMPONENTS python REQUIRED)
- endif()
+ # for boost >= 1.67 we must add the Python version suffix to
+ # the component name
+ if (Boost_VERSION VERSION_GREATER 106699)
+ find_package(Boost COMPONENTS python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR} REQUIRED) # find BOOST and boost-python
else()
- find_package( Boost COMPONENTS python REQUIRED) # find BOOST and boost-python
+ if(NOT PYTHON_VERSION_MAJOR LESS 3)
+ find_package( Boost COMPONENTS python3)
+ if (NOT Boost_PYTHON3_FOUND)
+ find_package( Boost COMPONENTS python REQUIRED)
+ endif()
+ else()
+ find_package( Boost COMPONENTS python REQUIRED) # find BOOST and boost-python
+ endif()
endif()
if(Boost_FOUND)