From ec7376ca2140fd4548aef29d6f7cbe95885186d4 Mon Sep 17 00:00:00 2001 From: ptahmose Date: Tue, 3 Sep 2024 09:30:20 +0200 Subject: [PATCH] update libcurl and enable SSL by default (on Windows) (#111) * clang-tidy fixes * cosmetic * Update CMake for libcurl: SChannel, version bump, fix - Enable SChannel backend for libcurl on Windows to use native SSL/TLS. - Update libcurl version from `curl-8_4_0` to `curl-8_9_1`. * update version-history * typo * typo --- CMakeLists.txt | 2 +- Src/CMakeLists.txt | 10 ++++++++-- Src/libCZI/Doc/version-history.markdown | 1 + 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2ac0efef..312db7db 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.15) cmake_policy(SET CMP0091 NEW) # enable new "MSVC runtime library selection" (https://cmake.org/cmake/help/latest/variable/CMAKE_MSVC_RUNTIME_LIBRARY.html) project(libCZI - VERSION 0.61.1 + VERSION 0.61.2 HOMEPAGE_URL "https://github.com/ZEISS/libczi" DESCRIPTION "libCZI is an Open Source Cross-Platform C++ library to read and write CZI") diff --git a/Src/CMakeLists.txt b/Src/CMakeLists.txt index 579297ed..22ee9459 100644 --- a/Src/CMakeLists.txt +++ b/Src/CMakeLists.txt @@ -37,10 +37,16 @@ if (LIBCZI_BUILD_CURL_BASED_STREAM) # if (APPLE) # for MacOS - let's choose Apple's native secure transport backend # set(CURL_USE_SECTRANSP ON) # endif(APPLE) + + # On Windows, we can enable the SChannel backend, as it is the native one, and it requires no additional dependencies. + if(WIN32) + set(CURL_USE_SCHANNEL ON CACHE BOOL "" FORCE) + endif(WIN32) + FetchContent_Declare( libcurl GIT_REPOSITORY "https://github.com/curl/curl.git" - GIT_TAG "curl-8_4_0" + GIT_TAG "curl-8_9_1" # Set the prefix to control where it's installed PREFIX "${CMAKE_BINARY_DIR}/vendor/curl" ) @@ -52,7 +58,7 @@ if (LIBCZI_BUILD_CURL_BASED_STREAM) set(BUILD_CURL_EXE OFF CACHE BOOL "" FORCE) set(CMAKE_POSITION_INDEPENDENT_CODE ON CACHE BOOL "" FORCE) set(ENABLE_UNICODE ON CACHE BOOL "" FORCE) - + FetchContent_MakeAvailable(libcurl) endif(LIBCZI_BUILD_PREFER_EXTERNALPACKAGE_LIBCURL) endif(LIBCZI_BUILD_CURL_BASED_STREAM) diff --git a/Src/libCZI/Doc/version-history.markdown b/Src/libCZI/Doc/version-history.markdown index 0eb5c7f3..2712bad2 100644 --- a/Src/libCZI/Doc/version-history.markdown +++ b/Src/libCZI/Doc/version-history.markdown @@ -25,3 +25,4 @@ version history {#version_history} 0.60.0 | [106](https://github.com/ZEISS/libczi/pull/106) | with metadata-builder, by default copy the attributes "Id" and "Name" from the channel-node; allow to control the behavior fine-grained 0.61.0 | [109](https://github.com/ZEISS/libczi/pull/109) | fix behaviour of `IXmlNodeRead::GetChildNodeReadonly` (for non-existing nodes), new method `ICziWriter::GetStatistics` added 0.61.1 | [110](https://github.com/ZEISS/libczi/pull/110) | some code cleanup + 0.61.2 | [111](https://github.com/ZEISS/libczi/pull/111) | update libcurl to 8.9.1 (for build with `LIBCZI_BUILD_PREFER_EXTERNALPACKAGE_LIBCURL=OFF`), enable SChannel (on Windows) by default \ No newline at end of file