Skip to content
Snippets Groups Projects
Commit 6ecdaa02 authored by Auke Klazema's avatar Auke Klazema
Browse files

SW-609: Make CMake look for libboost_python3 if building with python3 dependency

parent c391618b
No related branches found
No related tags found
No related merge requests found
...@@ -63,18 +63,9 @@ if("${Boost_FIND_COMPONENTS}" MATCHES "python") ...@@ -63,18 +63,9 @@ if("${Boost_FIND_COMPONENTS}" MATCHES "python")
find_package(Python) find_package(Python)
if(PYTHON_FOUND) if(PYTHON_FOUND)
if(PYTHON_VERSION_MAJOR GREATER 2) if(PYTHON_VERSION_MAJOR GREATER 2)
# TODO: add support for CentOS7 here (name should be python3 there) string(REPLACE "python" "python3"
if(APPLE) Boost_FIND_COMPONENTS "${Boost_FIND_COMPONENTS}")
# On apple (homebrew), boost-python for python 3 is called boost-python3 endif(PYTHON_VERSION_MAJOR GREATER 2)
string(REPLACE "python" "python3"
Boost_FIND_COMPONENTS "${Boost_FIND_COMPONENTS}")
else(APPLE)
# On ubuntu, boost-python for python 3 is called e.g. boost_python-py35
string(REPLACE "python"
"python-py${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}"
Boost_FIND_COMPONENTS "${Boost_FIND_COMPONENTS}")
endif(APPLE)
endif(PYTHON_VERSION_MAJOR GREATER 2)
else(PYTHON_FOUND) else(PYTHON_FOUND)
message(SEND_ERROR "boost-python was requested but python was not found.") message(SEND_ERROR "boost-python was requested but python was not found.")
endif(PYTHON_FOUND) endif(PYTHON_FOUND)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment