1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-10-26 12:25:09 +03:00

cmake: Don't check for Python 2

This commit is contained in:
Nick Wellnhofer 2022-09-04 19:13:14 +02:00
parent b0556e1449
commit 243fdbc31c
2 changed files with 1 additions and 9 deletions

View File

@ -135,7 +135,6 @@ cmake:linux:clang:static:
$Env:MINGW_PACKAGE_PREFIX-libiconv
$Env:MINGW_PACKAGE_PREFIX-ninja
$Env:MINGW_PACKAGE_PREFIX-python
$Env:MINGW_PACKAGE_PREFIX-python2
$Env:MINGW_PACKAGE_PREFIX-xz
$Env:MINGW_PACKAGE_PREFIX-zlib
- if (-not (Test-Path 7za.exe)) {

View File

@ -77,14 +77,7 @@ endif()
if(LIBXML2_WITH_PYTHON)
check_include_files(unistd.h HAVE_UNISTD_H)
check_symbol_exists(F_GETFL fcntl.h HAVE_F_GETFL)
if(HAVE_UNISTD_H AND HAVE_F_GETFL)
find_package(Python COMPONENTS Interpreter Development REQUIRED)
else()
find_package(Python2 COMPONENTS Interpreter Development REQUIRED)
add_library(Python::Python ALIAS Python2::Python)
set(Python_EXECUTABLE ${Python2_EXECUTABLE})
set(Python_SITEARCH ${Python2_SITEARCH})
endif()
find_package(Python COMPONENTS Interpreter Development REQUIRED)
set(LIBXML2_PYTHON_INSTALL_DIR ${Python_SITEARCH} CACHE PATH "Python bindings install directory")
endif()