summaryrefslogtreecommitdiff
path: root/cmake/modules/FindLibXML.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/modules/FindLibXML.cmake')
-rw-r--r--cmake/modules/FindLibXML.cmake19
1 files changed, 10 insertions, 9 deletions
diff --git a/cmake/modules/FindLibXML.cmake b/cmake/modules/FindLibXML.cmake
index 00120ec3..e99bf652 100644
--- a/cmake/modules/FindLibXML.cmake
+++ b/cmake/modules/FindLibXML.cmake
@@ -2,20 +2,21 @@
#
# Once done this will define
#
-# LIBXML_FOUND - system has libxml
+# LIBXML_FOUND - system has libxml 2.0
# LIBXML_CFLAGS
# LIBXML_LIBRARIES
find_package(PkgConfig)
if(PKG_CONFIG_FOUND)
- if(PACKAGE_FIND_VERSION_COUNT GREATER 0)
- set(_libxml_version_cmp ">=${PACKAGE_FIND_VERSION}")
- endif()
- pkg_check_modules(_pc_libxml libxml-2.0${_libxml_version_cmp})
- if(_pc_libxml_FOUND)
- set(LIBXML_FOUND TRUE)
- set(LIBXML_CFLAGS "${_pc_libxml_CFLAGS}")
- set(LIBXML_LIBRARIES "${_pc_libxml_LIBRARIES}")
+ if(DEFINED LibXML_FIND_VERSION)
+ set(_libxml_version_cmp ${LibXML_FIND_VERSION})
+ set(_libxml_version_cmp ">=${_libxml_version_cmp}")
+ pkg_check_modules(_pc_libxml libxml-2.0${_libxml_version_cmp})
+ if(_pc_libxml_FOUND)
+ set(LIBXML_FOUND TRUE)
+ set(LIBXML_CFLAGS "${_pc_libxml_CFLAGS}")
+ set(LIBXML_LIBRARIES "${_pc_libxml_LIBRARIES}")
+ endif()
endif()
endif()