summaryrefslogtreecommitdiff
path: root/libxml2-config.cmake.in
diff options
context:
space:
mode:
authorAron Xu <aron@debian.org>2015-09-21 22:58:06 +0800
committerAron Xu <aron@debian.org>2015-09-21 22:58:06 +0800
commit2ee13d9e464a1f5daccaff58f5d09d36b7c4f667 (patch)
treeb022967f880b7fb1e56c8cc4c3f200d6ffbc9efd /libxml2-config.cmake.in
parent7300193becde71a344c8ac0973dc290fa24d800d (diff)
downloadlibxml2-2ee13d9e464a1f5daccaff58f5d09d36b7c4f667.tar.gz
Revert "Imported Upstream version 2.9.1+dfsg1"upstream
This reverts commit 7300193becde71a344c8ac0973dc290fa24d800d.
Diffstat (limited to 'libxml2-config.cmake.in')
-rw-r--r--libxml2-config.cmake.in50
1 files changed, 50 insertions, 0 deletions
diff --git a/libxml2-config.cmake.in b/libxml2-config.cmake.in
new file mode 100644
index 0000000..ac29329
--- /dev/null
+++ b/libxml2-config.cmake.in
@@ -0,0 +1,50 @@
+# libxml2-config.cmake
+# --------------------
+#
+# Libxml2 cmake module.
+# THis module sets the following variables:
+#
+# ::
+#
+# LIBXML2_INCLUDE_DIRS - Directory where libxml2 headers are located.
+# LIBXML2_LIBRARIES - xml2 libraries to link against.
+# LIBXML2_VERSION_MAJOR - The major version of libxml2.
+# LIBXML2_VERSION_MINOR - The minor version of libxml2.
+# LIBXML2_VERSION_PATCH - The patch version of libxml2.
+# LIBXML2_VERSION_STRING - version number as a string (ex: "2.3.4")
+# LIBXML2_MODULES - whether libxml2 as dso support
+
+get_filename_component(_libxml2_rootdir ${CMAKE_CURRENT_LIST_DIR}/../../../ ABSOLUTE)
+
+set(LIBXML2_VERSION_MAJOR @LIBXML_MAJOR_VERSION@)
+set(LIBXML2_VERSION_MINOR @LIBXML_MINOR_VERSION@)
+set(LIBXML2_VERSION_MICRO @LIBXML_MICRO_VERSION@)
+set(LIBXML2_VERSION_STRING "@VERSION@")
+set(LIBXML2_INSTALL_PREFIX ${_libxml2_rootdir})
+set(LIBXML2_INCLUDE_DIRS ${_libxml2_rootdir}/include)
+set(LIBXML2_LIBRARY_DIR ${_libxml2_rootdir}/lib)
+set(LIBXML2_LIBRARIES -L${LIBXML2_LIBRARY_DIR} -lxml2)
+
+if(@WITH_THREADS@)
+ find_package(Threads REQUIRED)
+ list(APPEND LIBXML2_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
+endif()
+
+if(@WITH_LZMA@)
+ find_package(LibLZMA REQUIRED)
+ list(APPEND LIBXML2_LIBRARIES ${LIBLZMA_LIBRARIES})
+ list(APPEND LIBXML2_INCLUDE_DIRS ${LIBLZMA_INCLUDE_DIRS})
+endif()
+
+if(@WITH_ZLIB@)
+ find_package(ZLIB REQUIRED)
+ list(APPEND LIBXML2_LIBRARIES ${ZLIB_LIBRARIES})
+ list(APPEND LIBXML2_INCLUDE_DIRS ${ZLIB_INCLUDE_DIRS})
+endif()
+
+list(APPEND LIBXML2_LIBRARIES @ICU_LIBS@ @ICONV_LIBS@ @M_LIBS@ @WIN32_EXTRA_LIBADD@ @LIBS@)
+
+# whether libxml2 has dso support
+set(LIBXML2_MODULES @WITH_MODULES@)
+
+mark_as_advanced( LIBXML2_INCLUDE_DIRS LIBXML2_LIBRARIES )