cmake: add a patch to build on fedora38. Fixes #54348

This commit is contained in:
Loïc Bartoletti 2023-10-24 16:52:33 +02:00
parent 35e7f1542c
commit 822aa1eddb

View File

@ -1022,6 +1022,14 @@ else()
find_package(Python ${MIN_PYTHON_VERSION} REQUIRED COMPONENTS Interpreter)
endif()
# Fix python site-packages for Fedora
# See https://github.com/qgis/QGIS/issues/54348#issuecomment-1694216152
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
if(EXISTS "/etc/fedora-release")
EXECUTE_PROCESS(COMMAND ${Python_EXECUTABLE} -c "import sysconfig;print(sysconfig.get_path(\"platlib\", \"rpm_prefix\"), end=\"\")" OUTPUT_VARIABLE Python_SITEARCH)
endif()
endif()
message("-- Found Python executable: ${Python_EXECUTABLE} (version ${Python_VERSION})")
message("-- Python library: ${Python_LIBRARIES}")
message("-- Python site-packages: ${Python_SITEARCH}")