Skip to content

Commit 10e9614

Browse files
vicpopovSergey Yershov
authored andcommitted
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.
1 parent 1f2bc65 commit 10e9614

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

CMakeLists.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,15 @@ endif()
165165
if (PYBINDINGS)
166166
if (PYTHON_VERSION VERSION_GREATER 3.0)
167167
set(_Boost_PYTHON3_HEADERS "boost/python.hpp")
168-
find_package(Boost 1.64 REQUIRED COMPONENTS python3)
168+
if (NOT DEFINED BOOST_PYTHON_LIBNAME)
169+
set(BOOST_PYTHON_LIBNAME python3)
170+
endif()
169171
else()
170-
find_package(Boost 1.64 REQUIRED COMPONENTS python)
172+
if (NOT DEFINED BOOST_PYTHON_LIBNAME)
173+
set(BOOST_PYTHON_LIBNAME python)
174+
endif()
171175
endif()
176+
find_package(Boost 1.64 REQUIRED COMPONENTS ${BOOST_PYTHON_LIBNAME})
172177
find_package(PythonLibs ${PYTHON_VERSION} REQUIRED)
173178
include_directories(${PYTHON_INCLUDE_DIRS})
174179
endif()

0 commit comments

Comments
 (0)