diff options
Diffstat (limited to 'Modules/FindLibXml2.cmake')
-rw-r--r-- | Modules/FindLibXml2.cmake | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/Modules/FindLibXml2.cmake b/Modules/FindLibXml2.cmake index da8bfe0..9480cea 100644 --- a/Modules/FindLibXml2.cmake +++ b/Modules/FindLibXml2.cmake @@ -10,8 +10,12 @@ Find the XML processing library (libxml2). IMPORTED Targets ^^^^^^^^^^^^^^^^ -This module defines :prop_tgt:`IMPORTED` target ``LibXml2::LibXml2``, if -libxml2 has been found. +The following :prop_tgt:`IMPORTED` targets may be defined: + +``LibXml2::LibXml2`` + If the libxml2 library has been found +``LibXml2::xmllint`` + If the xmllint command-line executable has been found Result variables ^^^^^^^^^^^^^^^^ @@ -100,3 +104,8 @@ if(LibXml2_FOUND AND NOT TARGET LibXml2::LibXml2) set_target_properties(LibXml2::LibXml2 PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${LIBXML2_INCLUDE_DIRS}") set_property(TARGET LibXml2::LibXml2 APPEND PROPERTY IMPORTED_LOCATION "${LIBXML2_LIBRARY}") endif() + +if(LIBXML2_XMLLINT_EXECUTABLE AND NOT TARGET LibXml2::xmllint) + add_executable(LibXml2::xmllint IMPORTED) + set_target_properties(LibXml2::xmllint PROPERTIES IMPORTED_LOCATION "${LIBXML2_XMLLINT_EXECUTABLE}") +endif() |