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.
main
Kevin Kofler 6 years ago
parent 5f01a8ccc5
commit fa9aeb4a5d

@ -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"

Loading…
Cancel
Save