[Cmake-commits] CMake branch, master, updated. v3.9.0-rc6-300-g9604190

Kitware Robot kwrobot at kitware.com
Mon Jul 17 10:25:04 EDT 2017


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, master has been updated
       via  96041907014c9d1f83dc6b2c7fbbdab8aed728ea (commit)
       via  a1b3886556c0c052983fc2c9299f121c04a56b93 (commit)
      from  2d5e494637f9dad13fd0206ac3420e7d26f8b778 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=96041907014c9d1f83dc6b2c7fbbdab8aed728ea
commit 96041907014c9d1f83dc6b2c7fbbdab8aed728ea
Merge: 2d5e494 a1b3886
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Jul 17 14:24:18 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Mon Jul 17 10:24:54 2017 -0400

    Merge topic 'FindLibXml2-standard-vars'
    
    a1b38865 FindLibXml2: Switch to standard module variable names
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !1043


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a1b3886556c0c052983fc2c9299f121c04a56b93
commit a1b3886556c0c052983fc2c9299f121c04a56b93
Author:     Vadim Zhukov <persgray at gmail.com>
AuthorDate: Tue Jul 11 01:43:47 2017 +0300
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Jul 14 11:25:10 2017 -0400

    FindLibXml2: Switch to standard module variable names
    
    * LIBXML2_INCLUDE_DIR talks about libxml2 itself;
    * LIBXML2_INCLUDE_DIRS lists also include directories coming from
      libxml2's dependencies and is what libxml2 users should use;
    * LIBXML2_LIBRARY talks about libxml2 itself;
    * LIBXML2_LIBRARIES is what libxml2 users should link to.
    
    This commit doesn't break existing users of FindLibXml2.cmake,
    but provides the way for correct behaviour in future. In particular,
    on OpenBSD LIBXML2_INCLUDE_DIR resolves to /usr/local/include/libxml2,
    while libiconv (an libxml2 dependency) puts iconv.h
    in /usr/local/include, which is not picked up automatically.

diff --git a/Modules/FindLibXml2.cmake b/Modules/FindLibXml2.cmake
index 613f927..f68628d 100644
--- a/Modules/FindLibXml2.cmake
+++ b/Modules/FindLibXml2.cmake
@@ -5,18 +5,37 @@
 # FindLibXml2
 # -----------
 #
-# Try to find the LibXml2 xml processing library
+# Find the XML processing library (libxml2).
 #
-# Once done this will define
+# Result variables
+# ^^^^^^^^^^^^^^^^
 #
-# ::
+# This module will set the following variables in your project:
 #
-#   LIBXML2_FOUND - System has LibXml2
-#   LIBXML2_INCLUDE_DIR - The LibXml2 include directory
-#   LIBXML2_LIBRARIES - The libraries needed to use LibXml2
-#   LIBXML2_DEFINITIONS - Compiler switches required for using LibXml2
-#   LIBXML2_XMLLINT_EXECUTABLE - The XML checking tool xmllint coming with LibXml2
-#   LIBXML2_VERSION_STRING - the version of LibXml2 found (since CMake 2.8.8)
+# ``LIBXML2_FOUND``
+#   true if libxml2 headers and libraries were found
+# ``LIBXML2_INCLUDE_DIR``
+#   the directory containing LibXml2 headers
+# ``LIBXML2_INCLUDE_DIRS``
+#   list of the include directories needed to use LibXml2
+# ``LIBXML2_LIBRARIES``
+#   LibXml2 libraries to be linked
+# ``LIBXML2_DEFINITIONS``
+#   the compiler switches required for using LibXml2
+# ``LIBXML2_XMLLINT_EXECUTABLE``
+#   path to the XML checking tool xmllint coming with LibXml2
+# ``LIBXML2_VERSION_STRING``
+#   the version of LibXml2 found (since CMake 2.8.8)
+#
+# Cache variables
+# ^^^^^^^^^^^^^^^
+#
+# The following cache variables may also be set:
+#
+# ``LIBXML2_INCLUDE_DIR``
+#   the directory containing LibXml2 headers
+# ``LIBXML2_LIBRARY``
+#   path to the LibXml2 library
 
 # use pkg-config to get the directories and then use these values
 # in the find_path() and find_library() calls
@@ -31,7 +50,7 @@ find_path(LIBXML2_INCLUDE_DIR NAMES libxml/xpath.h
    PATH_SUFFIXES libxml2
    )
 
-find_library(LIBXML2_LIBRARIES NAMES xml2 libxml2
+find_library(LIBXML2_LIBRARY NAMES xml2 libxml2
    HINTS
    ${PC_LIBXML_LIBDIR}
    ${PC_LIBXML_LIBRARY_DIRS}
@@ -52,9 +71,12 @@ elseif(LIBXML2_INCLUDE_DIR AND EXISTS "${LIBXML2_INCLUDE_DIR}/libxml/xmlversion.
     unset(libxml2_version_str)
 endif()
 
+set(LIBXML2_INCLUDE_DIRS ${LIBXML2_INCLUDE_DIR} ${PC_LIBXML_INCLUDE_DIRS})
+set(LIBXML2_LIBRARIES ${LIBXML2_LIBRARY})
+
 include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2
-                                  REQUIRED_VARS LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR
+                                  REQUIRED_VARS LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR
                                   VERSION_VAR LIBXML2_VERSION_STRING)
 
-mark_as_advanced(LIBXML2_INCLUDE_DIR LIBXML2_LIBRARIES LIBXML2_XMLLINT_EXECUTABLE)
+mark_as_advanced(LIBXML2_INCLUDE_DIR LIBXML2_LIBRARY LIBXML2_XMLLINT_EXECUTABLE)

-----------------------------------------------------------------------

Summary of changes:
 Modules/FindLibXml2.cmake |   46 +++++++++++++++++++++++++++++++++------------
 1 file changed, 34 insertions(+), 12 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list