mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-19 14:50:07 +03:00
Require dependencies based on enabled CMake options
This commit is contained in:
parent
faea2fa9b8
commit
1c4f9a6db5
@ -103,7 +103,14 @@ cmake:linux:clang:static:
|
||||
- "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12"
|
||||
- $Env:Path="C:\msys64\$Env:MINGW_PATH\bin;C:\msys64\usr\bin;$Env:Path"
|
||||
- pacman --noconfirm -Syu
|
||||
- pacman --noconfirm -S $Env:MINGW_PACKAGE_PREFIX-cmake
|
||||
- pacman --noconfirm -S
|
||||
$Env:MINGW_PACKAGE_PREFIX-cmake
|
||||
$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)) {
|
||||
Invoke-WebRequest -Uri https://www.7-zip.org/a/7z1900-extra.7z -OutFile 7z1900-extra.7z ;
|
||||
cmake -E tar xf 7z1900-extra.7z 7za.exe
|
||||
|
@ -21,13 +21,6 @@ set(LIBXML_VERSION_STRING "${LIBXML_VERSION}")
|
||||
set(LIBXML_VERSION_EXTRA "")
|
||||
set(LIBXML_VERSION_NUMBER ${LIBXML_VERSION})
|
||||
|
||||
find_package(Iconv)
|
||||
find_package(ICU)
|
||||
find_package(LibLZMA)
|
||||
find_package(Python COMPONENTS Interpreter Development)
|
||||
find_package(Threads)
|
||||
find_package(ZLIB)
|
||||
|
||||
option(BUILD_SHARED_LIBS "Build shared libraries" ON)
|
||||
set(LIBXML2_WITH_AUTOMATA ON)
|
||||
option(LIBXML2_WITH_C14N "Add the Canonicalization support" ON)
|
||||
@ -38,42 +31,18 @@ set(LIBXML2_WITH_EXPR ON)
|
||||
option(LIBXML2_WITH_FTP "Add the FTP support" ON)
|
||||
option(LIBXML2_WITH_HTML "Add the HTML support" ON)
|
||||
option(LIBXML2_WITH_HTTP "Add the HTTP support" ON)
|
||||
|
||||
if(Iconv_FOUND)
|
||||
option(LIBXML2_WITH_ICONV "Add ICONV support" ON)
|
||||
else()
|
||||
set(LIBXML2_WITH_ICONV OFF)
|
||||
endif()
|
||||
|
||||
if(ICU_FOUND)
|
||||
option(LIBXML2_WITH_ICU "Add ICU support" OFF)
|
||||
else()
|
||||
set(LIBXML2_WITH_ICU OFF)
|
||||
endif()
|
||||
|
||||
option(LIBXML2_WITH_ICONV "Add ICONV support" ON)
|
||||
option(LIBXML2_WITH_ICU "Add ICU support" OFF)
|
||||
option(LIBXML2_WITH_ISO8859X "Add ISO8859X support if no iconv" ON)
|
||||
option(LIBXML2_WITH_LEGACY "Add deprecated APIs for compatibility" ON)
|
||||
|
||||
if(LIBLZMA_FOUND)
|
||||
option(LIBXML2_WITH_LZMA "Use liblzma" ON)
|
||||
else()
|
||||
set(LIBXML2_WITH_LZMA OFF)
|
||||
endif()
|
||||
|
||||
option(LIBXML2_WITH_LZMA "Use liblzma" ON)
|
||||
option(LIBXML2_WITH_MEM_DEBUG "Add the memory debugging module" OFF)
|
||||
option(LIBXML2_WITH_MODULES "Add the dynamic modules support" ON)
|
||||
option(LIBXML2_WITH_OUTPUT "Add the serialization support" ON)
|
||||
option(LIBXML2_WITH_PATTERN "Add the xmlPattern selection interface" ON)
|
||||
option(LIBXML2_WITH_PROGRAMS "Build programs" ON)
|
||||
option(LIBXML2_WITH_PUSH "Add the PUSH parser interfaces" ON)
|
||||
|
||||
if(Python_FOUND AND (Python_VERSION_MAJOR LESS 3 OR NOT WIN32))
|
||||
option(LIBXML2_WITH_PYTHON "Build Python bindings" ON)
|
||||
set(LIBXML2_PYTHON_INSTALL_DIR ${Python_SITEARCH} CACHE PATH "Python bindings install directory")
|
||||
else()
|
||||
set(LIBXML2_WITH_PYTHON OFF)
|
||||
endif()
|
||||
|
||||
option(LIBXML2_WITH_PYTHON "Build Python bindings" ON)
|
||||
option(LIBXML2_WITH_READER "Add the xmlReader parsing interface" ON)
|
||||
option(LIBXML2_WITH_REGEXPS "Add Regular Expressions support" ON)
|
||||
option(LIBXML2_WITH_RUN_DEBUG "Add the runtime debugging module" OFF)
|
||||
@ -81,13 +50,7 @@ option(LIBXML2_WITH_SAX1 "Add the older SAX1 interface" ON)
|
||||
option(LIBXML2_WITH_SCHEMAS "Add Relax-NG and Schemas support" ON)
|
||||
option(LIBXML2_WITH_SCHEMATRON "Add Schematron support" ON)
|
||||
option(LIBXML2_WITH_TESTS "Build tests" ON)
|
||||
|
||||
if(Threads_FOUND)
|
||||
option(LIBXML2_WITH_THREADS "Add multithread support" ON)
|
||||
else()
|
||||
set(LIBXML2_WITH_THREADS OFF)
|
||||
endif()
|
||||
|
||||
option(LIBXML2_WITH_THREADS "Add multithread support" ON)
|
||||
option(LIBXML2_WITH_THREAD_ALLOC "Add per-thread memory" OFF)
|
||||
option(LIBXML2_WITH_TREE "Add the DOM like tree manipulation APIs" ON)
|
||||
set(LIBXML2_WITH_TRIO OFF)
|
||||
@ -97,14 +60,42 @@ option(LIBXML2_WITH_WRITER "Add the xmlWriter saving interface" ON)
|
||||
option(LIBXML2_WITH_XINCLUDE "Add the XInclude support" ON)
|
||||
option(LIBXML2_WITH_XPATH "Add the XPATH support" ON)
|
||||
option(LIBXML2_WITH_XPTR "Add the XPointer support" ON)
|
||||
option(LIBXML2_WITH_ZLIB "Use libz" ON)
|
||||
set(LIBXML2_XMLCONF_WORKING_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE PATH "Working directory for XML Conformance Test Suite")
|
||||
|
||||
if(ZLIB_FOUND)
|
||||
option(LIBXML2_WITH_ZLIB "Use libz" ON)
|
||||
else()
|
||||
set(LIBXML2_WITH_ZLIB OFF)
|
||||
if(LIBXML2_WITH_ICONV)
|
||||
find_package(Iconv REQUIRED)
|
||||
endif()
|
||||
|
||||
set(LIBXML2_XMLCONF_WORKING_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE PATH "Working directory for XML Conformance Test Suite")
|
||||
if(LIBXML2_WITH_ICU)
|
||||
find_package(ICU REQUIRED)
|
||||
endif()
|
||||
|
||||
if(LIBXML2_WITH_LZMA)
|
||||
find_package(LibLZMA REQUIRED)
|
||||
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()
|
||||
set(LIBXML2_PYTHON_INSTALL_DIR ${Python_SITEARCH} CACHE PATH "Python bindings install directory")
|
||||
endif()
|
||||
|
||||
if(LIBXML2_WITH_THREADS)
|
||||
find_package(Threads REQUIRED)
|
||||
endif()
|
||||
|
||||
if(LIBXML2_WITH_ZLIB)
|
||||
find_package(ZLIB REQUIRED)
|
||||
endif()
|
||||
|
||||
foreach(VARIABLE IN ITEMS WITH_AUTOMATA WITH_C14N WITH_CATALOG WITH_DEBUG WITH_DOCB WITH_EXPR WITH_FTP WITH_HTML WITH_HTTP WITH_ICONV WITH_ICU WITH_ISO8859X WITH_LEGACY WITH_LZMA WITH_MEM_DEBUG WITH_MODULES WITH_OUTPUT WITH_PATTERN WITH_PUSH WITH_READER WITH_REGEXPS WITH_RUN_DEBUG WITH_SAX1 WITH_SCHEMAS WITH_SCHEMATRON WITH_THREADS WITH_THREAD_ALLOC WITH_TREE WITH_TRIO WITH_UNICODE WITH_VALID WITH_WRITER WITH_XINCLUDE WITH_XPATH WITH_XPTR WITH_ZLIB)
|
||||
if(LIBXML2_${VARIABLE})
|
||||
|
Loading…
x
Reference in New Issue
Block a user