[libxslt] Update dependencies based on pkg-config definition
- From: Nick Wellnhofer <nwellnhof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxslt] Update dependencies based on pkg-config definition
- Date: Fri, 15 Jan 2021 17:42:18 +0000 (UTC)
commit a1bae42b8a50129e8c77033a64ab46fc0ffaa386
Author: Markus Rickert <rickert fortiss org>
Date: Thu Dec 31 13:52:40 2020 +0100
Update dependencies based on pkg-config definition
CMakeLists.txt | 16 ----------------
libxslt-config.cmake.cmake.in | 13 +++----------
libxslt-config.cmake.in | 19 ++++---------------
3 files changed, 7 insertions(+), 41 deletions(-)
---
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2cf7db10..2bf18c1a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -216,20 +216,12 @@ target_include_directories(
$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/${CMAKE_INSTALL_INCLUDEDIR}>
)
-if(LIBXSLT_WITH_CRYPTO)
- target_link_libraries(LibXslt PRIVATE Gcrypt::Gcrypt)
-endif()
-
target_link_libraries(LibXslt PUBLIC LibXml2::LibXml2)
if(UNIX)
target_link_libraries(LibXslt PRIVATE m)
endif()
-if(LIBXSLT_WITH_THREADS)
- target_link_libraries(LibXslt PRIVATE Threads::Threads)
-endif()
-
set_target_properties(
LibXslt
PROPERTIES
@@ -311,14 +303,6 @@ endif()
target_link_libraries(LibExslt PUBLIC LibXslt LibXml2::LibXml2)
-if(UNIX)
- target_link_libraries(LibExslt PRIVATE m)
-endif()
-
-if(LIBXSLT_WITH_THREADS)
- target_link_libraries(LibExslt PRIVATE Threads::Threads)
-endif()
-
set_target_properties(
LibExslt
PROPERTIES
diff --git a/libxslt-config.cmake.cmake.in b/libxslt-config.cmake.cmake.in
index 31764602..0577fc41 100644
--- a/libxslt-config.cmake.cmake.in
+++ b/libxslt-config.cmake.cmake.in
@@ -78,25 +78,18 @@ 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()
+
+list(APPEND LIBXSLT_EXSLT_INCLUDE_DIRS ${LIBXSLT_INCLUDE_DIRS})
+list(APPEND LIBXSLT_EXSLT_LIBRARIES ${LIBXSLT_LIBRARIES})
diff --git a/libxslt-config.cmake.in b/libxslt-config.cmake.in
index 1fb65624..c99228f4 100644
--- a/libxslt-config.cmake.in
+++ b/libxslt-config.cmake.in
@@ -69,23 +69,10 @@ find_dependency(LibXml2 CONFIG)
list(APPEND LIBXSLT_INCLUDE_DIRS ${LIBXML2_INCLUDE_DIRS})
list(APPEND LIBXSLT_LIBRARIES ${LIBXML2_LIBRARIES})
list(APPEND LIBXSLT_INTERFACE_LINK_LIBRARIES "LibXml2::LibXml2")
-list(APPEND LIBXSLT_EXSLT_INCLUDE_DIRS ${LIBXML2_INCLUDE_DIRS})
-list(APPEND LIBXSLT_EXSLT_LIBRARIES ${LIBXML2_LIBRARIES})
-list(APPEND LIBXSLT_EXSLT_INTERFACE_LINK_LIBRARIES "LibXml2::LibXml2")
-
-if(@WITH_THREADS@)
- find_dependency(Threads)
- list(APPEND LIBXSLT_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
- list(APPEND LIBXSLT_INTERFACE_LINK_LIBRARIES "\$<LINK_ONLY:Threads::Threads>")
- list(APPEND LIBXSLT_EXSLT_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
- list(APPEND LIBXSLT_EXSLT_INTERFACE_LINK_LIBRARIES "\$<LINK_ONLY:Threads::Threads>")
-endif()
if(@WITH_CRYPTO@)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
find_dependency(Gcrypt)
- list(APPEND LIBXSLT_LIBRARIES ${GCRYPT_LIBRARIES})
- list(APPEND LIBXSLT_INTERFACE_LINK_LIBRARIES "\$<LINK_ONLY:Gcrypt::Gcrypt>")
list(APPEND LIBXSLT_EXSLT_LIBRARIES ${GCRYPT_LIBRARIES})
list(APPEND LIBXSLT_EXSLT_INTERFACE_LINK_LIBRARIES "\$<LINK_ONLY:Gcrypt::Gcrypt>")
endif()
@@ -93,10 +80,12 @@ endif()
if(UNIX)
list(APPEND LIBXSLT_LIBRARIES m)
list(APPEND LIBXSLT_INTERFACE_LINK_LIBRARIES "\$<LINK_ONLY:m>")
- list(APPEND LIBXSLT_EXSLT_LIBRARIES m)
- list(APPEND LIBXSLT_EXSLT_INTERFACE_LINK_LIBRARIES "\$<LINK_ONLY:m>")
endif()
+list(APPEND LIBXSLT_EXSLT_INCLUDE_DIRS ${LIBXSLT_INCLUDE_DIRS})
+list(APPEND LIBXSLT_EXSLT_LIBRARIES ${LIBXSLT_LIBRARIES})
+list(APPEND LIBXSLT_EXSLT_INTERFACE_LINK_LIBRARIES "LibXslt::LibXslt")
+
mark_as_advanced(LIBXSLT_LIBRARY LIBXSLT_EXSLT_LIBRARY LIBXSLT_XSLTPROC_EXECUTABLE)
if(NOT TARGET LibXslt::LibXslt AND DEFINED LIBXSLT_LIBRARY AND DEFINED LIBXSLT_INCLUDE_DIRS)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]