[libxslt/cmake-crypto-win32: 2/3] CMake: Relax check for enabling crypto support on Windows
- From: Nick Wellnhofer <nwellnhof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxslt/cmake-crypto-win32: 2/3] CMake: Relax check for enabling crypto support on Windows
- Date: Fri, 18 Mar 2022 12:58:29 +0000 (UTC)
commit 4aad4032328a0c3f3b3d1e2974fa671af00a12b8
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Wed Mar 9 12:48:47 2022 +0800
CMake: Relax check for enabling crypto support on Windows
The crypto support in libexslt uses the native Windows APIs instead of GCrypt
on Windows, so it is enabled by default in the win32 Makefile build system.
Make it easier for people to enable such support in the CMake builds on
Windows, since we don't need to look for or use GCrypt on Windows when enabling
crypto support.
CMakeLists.txt | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d8679fb7..10564f89 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -26,7 +26,7 @@ option(LIBXSLT_WITH_THREADS "Add multithread support" ON)
set(LIBXSLT_WITH_TRIO OFF)
option(LIBXSLT_WITH_XSLT_DEBUG "Add the debugging code" ON)
-if(LIBXSLT_WITH_CRYPTO)
+if(LIBXSLT_WITH_CRYPTO AND NOT WIN32)
find_package(Gcrypt REQUIRED)
endif()
@@ -77,7 +77,7 @@ set(LIBEXSLT_VERSION ${LIBEXSLT_DOTTED_VERSION})
set(MODULE_EXTENSION "${CMAKE_SHARED_LIBRARY_SUFFIX}")
-if(LIBXSLT_WITH_CRYPTO)
+if(LIBXSLT_WITH_CRYPTO AND NOT WIN32)
list(APPEND CMAKE_REQUIRED_LIBRARIES Gcrypt::Gcrypt)
endif()
@@ -310,7 +310,7 @@ target_include_directories(
$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/${CMAKE_INSTALL_INCLUDEDIR}>
)
-if(LIBXSLT_WITH_CRYPTO)
+if(LIBXSLT_WITH_CRYPTO AND NOT WIN32)
target_link_libraries(LibExslt PRIVATE Gcrypt::Gcrypt)
set(LIBGCRYPT_LIBS "-lgcrypt")
endif()
@@ -432,7 +432,7 @@ install(FILES libxslt/libxslt.3 DESTINATION ${CMAKE_INSTALL_MANDIR}/man3 COMPONE
install(FILES doc/xsltproc.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 COMPONENT documentation)
install(DIRECTORY doc/ DESTINATION ${CMAKE_INSTALL_DATADIR}/doc/libxslt COMPONENT documentation PATTERN
Makefile.* EXCLUDE)
-if(LIBXSLT_WITH_CRYPTO)
+if(LIBXSLT_WITH_CRYPTO AND NOT WIN32)
install(FILES FindGcrypt.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libxslt-${PROJECT_VERSION}
COMPONENT development)
endif()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]