From fa9aeb4a5d51882631047369a655fbda35e6ea07 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Sun, 5 May 2019 21:52:55 +0200 Subject: [PATCH] CMake: Fix BoostPython3.cmake for Fedora >= 30 CMakeModules/BoostPython3.cmake: Also try e.g. "python37" as the module name, because Fedora 30 switched from the e.g. "python-py37" format to that. Otherwise, Boost::Python3 cannot be found on Fedora without manually setting CALAMARES_BOOST_PYTHON3_COMPONENT. --- CMakeModules/BoostPython3.cmake | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CMakeModules/BoostPython3.cmake b/CMakeModules/BoostPython3.cmake index c128b58f1..70fb0aa49 100644 --- a/CMakeModules/BoostPython3.cmake +++ b/CMakeModules/BoostPython3.cmake @@ -15,6 +15,11 @@ # libboost_python-3.4.so # depending on what python's targets you selected during install # +# On Fedora >= 30 instead, the boost-python3-devel provides boost library with a +# name like: +# libboost_python37.so +# depending on what python's targets you selected during install +# # find_boost_python3() tries to find the package with different component # names. By default it tries "python3", "python-py$suffix" and # "python-$dotsuffix", where suffix is based on the `python_version` argument. @@ -46,6 +51,10 @@ macro( find_boost_python3 boost_version python_version found_var ) string( REGEX REPLACE "([0-9]+)\\.([0-9]+)\\..*" "\\1\\2" _fbp_python_short_version ${python_version} ) _find_boost_python3_int( ${boost_version} python-py${_fbp_python_short_version} _fbp_found ) + if (NOT _fbp_found) + _find_boost_python3_int( ${boost_version} python${_fbp_python_short_version} _fbp_found ) + endif() + if (NOT _fbp_found) # The following loop changes the searched name for Gentoo based distributions # turns "3.4.123abc" into "3.4"