Skip to content

Commit

Permalink
update libcurl and enable SSL by default (on Windows) (#111)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
ptahmose authored Sep 3, 2024
1 parent 3567211 commit ec7376c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down
10 changes: 8 additions & 2 deletions Src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand All @@ -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)
Expand Down
1 change: 1 addition & 0 deletions Src/libCZI/Doc/version-history.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit ec7376c

Please sign in to comment.