[libxml2] Add xmlcatalog target and definition to config files
- From: Nick Wellnhofer <nwellnhof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml2] Add xmlcatalog target and definition to config files
- Date: Fri, 15 Jan 2021 17:39:26 +0000 (UTC)
commit ec1198759224427fdf43208c282fa8c52229cc7d
Author: Markus Rickert <rickert fortiss org>
Date: Wed Dec 30 14:40:43 2020 +0100
Add xmlcatalog target and definition to config files
libxml2-config.cmake.cmake.in | 3 ++-
libxml2-config.cmake.in | 8 +++++++-
2 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/libxml2-config.cmake.cmake.in b/libxml2-config.cmake.cmake.in
index fa4d722f..dbdbc694 100644
--- a/libxml2-config.cmake.cmake.in
+++ b/libxml2-config.cmake.cmake.in
@@ -73,6 +73,7 @@ macro(select_executable_location target basename)
endmacro()
select_library_location(LibXml2::LibXml2 LIBXML2)
+select_executable_location(LibXml2::xmlcatalog LIBXML2_XMLCATALOG)
select_executable_location(LibXml2::xmllint LIBXML2_XMLLINT)
set(LIBXML2_LIBRARIES ${LIBXML2_LIBRARY})
@@ -121,4 +122,4 @@ endif()
# whether libxml2 has dso support
set(LIBXML2_MODULES @LIBXML2_WITH_MODULES@)
-mark_as_advanced(LIBXML2_LIBRARY LIBXML2_XMLLINT_EXECUTABLE)
+mark_as_advanced(LIBXML2_LIBRARY LIBXML2_XMLCATALOG_EXECUTABLE LIBXML2_XMLLINT_EXECUTABLE)
diff --git a/libxml2-config.cmake.in b/libxml2-config.cmake.in
index f0bc156c..993bc1af 100644
--- a/libxml2-config.cmake.in
+++ b/libxml2-config.cmake.in
@@ -35,6 +35,7 @@ set(LIBXML2_INCLUDE_DIR ${_libxml2_rootdir}/include/libxml2)
set(LIBXML2_LIBRARY_DIR ${_libxml2_rootdir}/lib)
find_library(LIBXML2_LIBRARY NAMES xml2 HINTS ${LIBXML2_LIBRARY_DIR} NO_DEFAULT_PATH)
+find_program(LIBXML2_XMLCATALOG_EXECUTABLE NAMES xmlcatalog HINTS ${_libxml2_rootdir}/bin NO_DEFAULT_PATH)
find_program(LIBXML2_XMLLINT_EXECUTABLE NAMES xmllint HINTS ${_libxml2_rootdir}/bin NO_DEFAULT_PATH)
set(LIBXML2_LIBRARIES ${LIBXML2_LIBRARY})
@@ -87,7 +88,7 @@ endif()
# whether libxml2 has dso support
set(LIBXML2_MODULES @WITH_MODULES@)
-mark_as_advanced(LIBXML2_LIBRARY LIBXML2_XMLLINT_EXECUTABLE)
+mark_as_advanced(LIBXML2_LIBRARY LIBXML2_XMLCATALOG_EXECUTABLE LIBXML2_XMLLINT_EXECUTABLE)
if(NOT TARGET LibXml2::LibXml2)
add_library(LibXml2::LibXml2 UNKNOWN IMPORTED)
@@ -97,6 +98,11 @@ if(NOT TARGET LibXml2::LibXml2)
set_target_properties(LibXml2::LibXml2 PROPERTIES INTERFACE_LINK_LIBRARIES
"${LIBXML2_INTERFACE_LINK_LIBRARIES}")
endif()
+if(NOT TARGET LibXml2::xmlcatalog)
+ add_executable(LibXml2::xmlcatalog IMPORTED)
+ set_target_properties(LibXml2::xmlcatalog PROPERTIES IMPORTED_LOCATION "${LIBXML2_XMLCATALOG_EXECUTABLE}")
+endif()
+
if(NOT TARGET LibXml2::xmllint)
add_executable(LibXml2::xmllint IMPORTED)
set_target_properties(LibXml2::xmllint PROPERTIES IMPORTED_LOCATION "${LIBXML2_XMLLINT_EXECUTABLE}")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]