Skip to content
Snippets Groups Projects
Commit de959d58debd authored by Chun-wei Fan's avatar Chun-wei Fan
Browse files

CMake: Relax check for Python 3.x support on Windows

Since the code is now ported to support Python 3.x on Windows, we can enable
building the Python-3.x version of the Python modules on Windows directly.

Not sure about the other platforms that the Python libxslt module supports, so
continue to require unistd.h and have F_GETFL support in fcntl.h on the other
platforms.
parent 4dab6613f318
Branches
No related tags found
No related merge requests found
......@@ -59,4 +59,5 @@
if(LIBXSLT_WITH_PYTHON)
check_include_files(unistd.h HAVE_UNISTD_H)
check_symbol_exists(F_GETFL fcntl.h HAVE_F_GETFL)
if(WIN32 OR (HAVE_UNISTD_H AND HAVE_F_GETFL))
find_package(Python COMPONENTS Interpreter Development REQUIRED)
......@@ -62,2 +63,8 @@
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()
#set(LIBXSLT_PYTHON_INSTALL_DIR ${Python_SITEARCH} CACHE PATH "Python bindings install directory")
......@@ -63,6 +70,5 @@
#set(LIBXSLT_PYTHON_INSTALL_DIR ${Python_SITEARCH} CACHE PATH "Python bindings install directory")
set(LIBXSLT_PYTHON_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/python"
CACHE PATH "Python bindings install directory")
set(LIBXSLT_PYTHON_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/python" CACHE PATH "Python bindings install directory")
endif()
if(LIBXSLT_WITH_THREADS)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment