diff options
author | Sylvain Joubert <joubert.sy@gmail.com> | 2019-12-24 15:42:32 (GMT) |
---|---|---|
committer | Sylvain Joubert <joubert.sy@gmail.com> | 2019-12-31 11:45:26 (GMT) |
commit | a179cbf205501b6470d2f8e892876cc8672e7096 (patch) | |
tree | fe85ec5e17f16ba376fb31eb3fa0b160cb9b59c9 /Modules | |
parent | a07134e33934bdd4b50d2a4d3293fcd3f495a3d6 (diff) | |
download | CMake-a179cbf205501b6470d2f8e892876cc8672e7096.zip CMake-a179cbf205501b6470d2f8e892876cc8672e7096.tar.gz CMake-a179cbf205501b6470d2f8e892876cc8672e7096.tar.bz2 |
FindLibXml2: provide imported target LibXml2::xmllint
Diffstat (limited to 'Modules')
-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() |