From 6ecdaa02d05234074e78a0ce8357636fcf6364a4 Mon Sep 17 00:00:00 2001 From: Auke Klazema <klazema@astron.nl> Date: Wed, 27 Mar 2019 13:59:32 +0000 Subject: [PATCH] SW-609: Make CMake look for libboost_python3 if building with python3 dependency --- CMake/FindBoost.cmake | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/CMake/FindBoost.cmake b/CMake/FindBoost.cmake index 78dbcebe442..77eb5579c85 100644 --- a/CMake/FindBoost.cmake +++ b/CMake/FindBoost.cmake @@ -63,18 +63,9 @@ if("${Boost_FIND_COMPONENTS}" MATCHES "python") find_package(Python) if(PYTHON_FOUND) if(PYTHON_VERSION_MAJOR GREATER 2) - # TODO: add support for CentOS7 here (name should be python3 there) - if(APPLE) - # On apple (homebrew), boost-python for python 3 is called boost-python3 - 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) + string(REPLACE "python" "python3" + Boost_FIND_COMPONENTS "${Boost_FIND_COMPONENTS}") + endif(PYTHON_VERSION_MAJOR GREATER 2) else(PYTHON_FOUND) message(SEND_ERROR "boost-python was requested but python was not found.") endif(PYTHON_FOUND) -- GitLab