From 10e9614012cb96ea3de9e1528d651c6005193f4c Mon Sep 17 00:00:00 2001 From: Victor Popov Date: Tue, 8 Jan 2019 14:37:16 +0300 Subject: Add overridable boost_python library name This would be needed for updating boost to 1.67 or later - the python bindings libraries changed their names to contain python version they are built against. Also this naming change is backported to our boost packages on linux. --- CMakeLists.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f7210d85a0..e3ecb6b979 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -165,10 +165,15 @@ endif() if (PYBINDINGS) if (PYTHON_VERSION VERSION_GREATER 3.0) set(_Boost_PYTHON3_HEADERS "boost/python.hpp") - find_package(Boost 1.64 REQUIRED COMPONENTS python3) + if (NOT DEFINED BOOST_PYTHON_LIBNAME) + set(BOOST_PYTHON_LIBNAME python3) + endif() else() - find_package(Boost 1.64 REQUIRED COMPONENTS python) + if (NOT DEFINED BOOST_PYTHON_LIBNAME) + set(BOOST_PYTHON_LIBNAME python) + endif() endif() + find_package(Boost 1.64 REQUIRED COMPONENTS ${BOOST_PYTHON_LIBNAME}) find_package(PythonLibs ${PYTHON_VERSION} REQUIRED) include_directories(${PYTHON_INCLUDE_DIRS}) endif() -- cgit v1.2.3