diff options
author | Brad King <brad.king@kitware.com> | 2017-08-02 20:28:22 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2017-08-02 20:28:24 (GMT) |
commit | 901456d76e769af3868d2163d9345ca53af16353 (patch) | |
tree | 9e6fb5e444b26916a4c9077fc6b3edfb12a7dfc1 | |
parent | 6bef326eb4140444ed70a202bc37af11e0ba158b (diff) | |
parent | d1a7756547a26c3ec0cfba84f138066aef5bc0aa (diff) | |
download | CMake-901456d76e769af3868d2163d9345ca53af16353.zip CMake-901456d76e769af3868d2163d9345ca53af16353.tar.gz CMake-901456d76e769af3868d2163d9345ca53af16353.tar.bz2 |
Merge topic 'FindLibXml2-compat'
d1a77565 FindLibXml2: Restore compatibility with projects setting LIBXML2_LIBRARIES
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1094
-rw-r--r-- | Modules/FindLibXml2.cmake | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Modules/FindLibXml2.cmake b/Modules/FindLibXml2.cmake index f68628d..8ac2980 100644 --- a/Modules/FindLibXml2.cmake +++ b/Modules/FindLibXml2.cmake @@ -50,6 +50,13 @@ find_path(LIBXML2_INCLUDE_DIR NAMES libxml/xpath.h PATH_SUFFIXES libxml2 ) +# CMake 3.9 and below used 'LIBXML2_LIBRARIES' as the name of +# the cache entry storing the find_library result. Use the +# value if it was set by the project or user. +if(DEFINED LIBXML2_LIBRARIES AND NOT DEFINED LIBXML2_LIBRARY) + set(LIBXML2_LIBRARY ${LIBXML2_LIBRARIES}) +endif() + find_library(LIBXML2_LIBRARY NAMES xml2 libxml2 HINTS ${PC_LIBXML_LIBDIR} |