Skip to content

Commit

Permalink
Add overridable boost_python library name
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
vicpopov authored and Sergey Yershov committed Jan 9, 2019
1 parent 1f2bc65 commit 10e9614
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 10e9614

Please sign in to comment.