[libxslt] Update CMake config files
- From: Nick Wellnhofer <nwellnhof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxslt] Update CMake config files
- Date: Wed, 16 Dec 2020 16:09:15 +0000 (UTC)
commit f2083247704b0c809eada0cd588203b16fd272ea
Author: Markus Rickert <rickert fortiss org>
Date: Mon Dec 7 16:53:09 2020 +0100
Update CMake config files
CMakeLists.txt | 2 +-
libxslt-config.cmake.cmake.in | 98 +++++++++++++++++++++++++++++++++++++++++++
libxslt-config.cmake.in | 76 ---------------------------------
3 files changed, 99 insertions(+), 77 deletions(-)
---
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 394cc578..65bf9e78 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -428,7 +428,7 @@ if(LIBXSLT_WITH_CRYPTO)
endif()
configure_package_config_file(
- libxslt-config.cmake.in libxslt-config.cmake
+ libxslt-config.cmake.cmake.in libxslt-config.cmake
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libxslt-${VERSION}
)
diff --git a/libxslt-config.cmake.cmake.in b/libxslt-config.cmake.cmake.in
new file mode 100644
index 00000000..b64473f9
--- /dev/null
+++ b/libxslt-config.cmake.cmake.in
@@ -0,0 +1,98 @@
+set(LIBXSLT_VERSION "@VERSION@")
+set(LIBXSLT_VERSION_MAJOR "@LIBXSLT_MAJOR_VERSION@")
+set(LIBXSLT_VERSION_MINOR "@LIBXSLT_MINOR_VERSION@")
+set(LIBXSLT_VERSION_PATCH "@LIBXSLT_MICRO_VERSION@")
+
+set(LIBEXSLT_VERSION "@LIBEXSLT_VERSION@")
+set(LIBEXSLT_VERSION_MAJOR "@LIBEXSLT_MAJOR_VERSION@")
+set(LIBEXSLT_VERSION_MINOR "@LIBEXSLT_MINOR_VERSION@")
+set(LIBEXSLT_VERSION_PATCH "@LIBEXSLT_MICRO_VERSION@")
+
+@PACKAGE_INIT@
+
+include("${CMAKE_CURRENT_LIST_DIR}/libxslt-export.cmake")
+
+set(LIBXSLT_DEFINITIONS "")
+set(LIBXSLT_INCLUDE_DIR "${PACKAGE_PREFIX_DIR}/@CMAKE_INSTALL_INCLUDEDIR@")
+set(LIBXSLT_LIBRARY_DIR "${PACKAGE_PREFIX_DIR}/@CMAKE_INSTALL_LIBDIR@")
+set(LIBXSLT_EXSLT_INCLUDE_DIR "${PACKAGE_PREFIX_DIR}/@CMAKE_INSTALL_INCLUDEDIR@")
+set(LIBXSLT_EXSLT_LIBRARY_DIR "${PACKAGE_PREFIX_DIR}/@CMAKE_INSTALL_LIBDIR@")
+
+macro(select_library_location target basename)
+ foreach(property IN ITEMS IMPORTED_LOCATION IMPORTED_IMPLIB)
+ get_target_property(${basename}_${property}_DEBUG ${target} ${property}_DEBUG)
+ get_target_property(${basename}_${property}_MINSIZEREL ${target} ${property}_MINSIZEREL)
+ get_target_property(${basename}_${property}_RELEASE ${target} ${property}_RELEASE)
+ get_target_property(${basename}_${property}_RELWITHDEBINFO ${target}
${property}_RELWITHDEBINFO)
+
+ if(${basename}_${property}_DEBUG AND ${basename}_${property}_RELEASE)
+ set(${basename}_LIBRARY debug ${${basename}_${property}_DEBUG} optimized
${${basename}_${property}_RELEASE})
+ elseif(${basename}_${property}_DEBUG AND ${basename}_${property}_RELWITHDEBINFO)
+ set(${basename}_LIBRARY debug ${${basename}_${property}_DEBUG} optimized
${${basename}_${property}_RELWITHDEBINFO})
+ elseif(${basename}_${property}_DEBUG AND ${basename}_${property}_MINSIZEREL)
+ set(${basename}_LIBRARY debug ${${basename}_${property}_DEBUG} optimized
${${basename}_${property}_MINSIZEREL})
+ elseif(${basename}_${property}_RELEASE)
+ set(${basename}_LIBRARY ${${basename}_${property}_RELEASE})
+ elseif(${basename}_${property}_RELWITHDEBINFO)
+ set(${basename}_LIBRARY ${${basename}_${property}_RELWITHDEBINFO})
+ elseif(${basename}_${property}_MINSIZEREL)
+ set(${basename}_LIBRARY ${${basename}_${property}_MINSIZEREL})
+ elseif(${basename}_${property}_DEBUG)
+ set(${basename}_LIBRARY ${${basename}_${property}_DEBUG})
+ endif()
+ endforeach()
+endmacro()
+
+macro(select_executable_location target basename)
+ get_target_property(${basename}_IMPORTED_LOCATION_DEBUG ${target} IMPORTED_LOCATION_DEBUG)
+ get_target_property(${basename}_IMPORTED_LOCATION_MINSIZEREL ${target} IMPORTED_LOCATION_MINSIZEREL)
+ get_target_property(${basename}_IMPORTED_LOCATION_RELEASE ${target} IMPORTED_LOCATION_RELEASE)
+ get_target_property(${basename}_IMPORTED_LOCATION_RELWITHDEBINFO ${target}
IMPORTED_LOCATION_RELWITHDEBINFO)
+
+ if(${basename}_IMPORTED_LOCATION_RELEASE)
+ set(${basename}_EXECUTABLE ${${basename}_IMPORTED_LOCATION_RELEASE})
+ elseif(${basename}_IMPORTED_LOCATION_RELWITHDEBINFO)
+ set(${basename}_EXECUTABLE ${${basename}_IMPORTED_LOCATION_RELWITHDEBINFO})
+ elseif(${basename}_IMPORTED_LOCATION_MINSIZEREL)
+ set(${basename}_EXECUTABLE ${${basename}_IMPORTED_LOCATION_MINSIZEREL})
+ elseif(${basename}_IMPORTED_LOCATION_DEBUG)
+ set(${basename}_EXECUTABLE ${${basename}_IMPORTED_LOCATION_DEBUG})
+ endif()
+endmacro()
+
+select_library_location(LibXslt::LibXslt LIBXSLT)
+select_library_location(LibXslt::LibExslt LIBXSLT_EXSLT)
+select_executable_location(LibXslt::xsltproc LIBXSLT_XSLTPROC)
+
+set(LIBXSLT_INCLUDE_DIRS ${LIBXSLT_INCLUDE_DIR})
+set(LIBXSLT_LIBRARIES ${LIBXSLT_LIBRARY})
+set(LIBXSLT_EXSLT_INCLUDE_DIRS ${LIBXSLT_EXSLT_INCLUDE_DIR})
+set(LIBXSLT_EXSLT_LIBRARIES ${LIBXSLT_EXSLT_LIBRARY})
+
+include(CMakeFindDependencyMacro)
+
+find_dependency(LibXml2 CONFIG)
+list(APPEND LIBXSLT_INCLUDE_DIRS ${LIBXML2_INCLUDE_DIRS})
+list(APPEND LIBXSLT_LIBRARIES ${LIBXML2_LIBRARIES})
+list(APPEND LIBXSLT_EXSLT_INCLUDE_DIRS ${LIBXML2_INCLUDE_DIRS})
+list(APPEND LIBXSLT_EXSLT_LIBRARIES ${LIBXML2_LIBRARIES})
+
+if(NOT @BUILD_SHARED_LIBS@)
+ if(@LIBXSLT_WITH_THREADS@)
+ find_dependency(Threads)
+ list(APPEND LIBXSLT_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
+ list(APPEND LIBXSLT_EXSLT_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
+ endif()
+
+ if(@LIBXSLT_WITH_CRYPTO@)
+ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
+ find_dependency(Gcrypt)
+ list(APPEND LIBXSLT_LIBRARIES ${GCRYPT_LIBRARIES})
+ list(APPEND LIBXSLT_EXSLT_LIBRARIES ${GCRYPT_LIBRARIES})
+ endif()
+
+ if(UNIX)
+ list(APPEND LIBXSLT_LIBRARIES m)
+ list(APPEND LIBXSLT_EXSLT_LIBRARIES m)
+ endif()
+endif()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]