I did this
I cloned the repo with fetchcontent while building. As the feature is not needed, I did find_package(OpenSSL) before FetchContent_MakeAvailable to set CURL_USE_OPENSSL to off if it's not buildable, and configuring fails.
To reproduce you can put the following CMakeLists.txt in the parent-directory of your source-dir (curl-8_10_1 and master tested) and try to build that one without findable openssl:
project(test)
find_package(OpenSSL)
set (CURL_USE_OPENSSL OFF CACHE BOOL "")
#unset (OPENSSL_LIBRARIES)
add_subdirectory(curl)
With the commented line your'll get:
-- Looking for stddef.h - found
-- Check size of size_t
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
OPENSSL_CRYPTO_LIBRARY
linked by target "cmTC_dee16" in directory /home/werner/Devel/Build/curl/CMakeFiles/CMakeScratch/TryCompile-KljE6a
OPENSSL_SSL_LIBRARY
linked by target "cmTC_dee16" in directory /home/werner/Devel/Build/curl/CMakeFiles/CMakeScratch/TryCompile-KljE6a
CMake Error at /usr/share/cmake-3.30/Modules/CheckTypeSize.cmake:147 (try_compile):
Failed to generate test project build system.
Call Stack (most recent call first):
/usr/share/cmake-3.30/Modules/CheckTypeSize.cmake:272 (__check_type_size_impl)
curl/CMakeLists.txt:1429 (check_type_size)
If you remove the "#" all works fine.
I identified this line to add the libs without any checks. I don't know any of that ldap-related stuff, so I can't just fix this myself.
I expected the following
A clean running config stage
curl/libcurl version
master
operating system
Debian testing
I did this
I cloned the repo with fetchcontent while building. As the feature is not needed, I did find_package(OpenSSL) before FetchContent_MakeAvailable to set CURL_USE_OPENSSL to off if it's not buildable, and configuring fails.
To reproduce you can put the following CMakeLists.txt in the parent-directory of your source-dir (curl-8_10_1 and master tested) and try to build that one without findable openssl:
With the commented line your'll get:
If you remove the "#" all works fine.
I identified this line to add the libs without any checks. I don't know any of that ldap-related stuff, so I can't just fix this myself.
I expected the following
A clean running config stage
curl/libcurl version
master
operating system
Debian testing