Open sburton84 opened 1 year ago
I guess it's a consequence of this macro in libcurl (https://github.com/curl/curl/blob/curl-8_0_1/CMake/Macros.cmake#L31-L37) called several times, which fails in some circumstances depending on what has been appended to CURL_LIBS
, due to a conan client issue related to CMakeDeps: https://github.com/conan-io/conan/issues/12180 & https://github.com/conan-io/conan/issues/12012.
I think this line check_library_exists("${LIBRARY};${CURL_LIBS}" ${SYMBOL} "${CMAKE_LIBRARY_PATH}"
could be replaced by check_library_exists("${LIBRARY}" ${SYMBOL} "${CMAKE_LIBRARY_PATH}"
as a workaround to fix this issue, without other side effects.
Description
When installing libcurl as a dependency on Windows (using MSVC 2022 (v17)) with the
with_c_ares
option enabled it fails to configure the libcurl CMake project with the following error:This only seems to happen on Windows, Linux builds work fine. Release builds fail in the same way but with the
CONAN_LIB::c-ares_c-ares_cares_cares_RELEASE
target instead.Package and Environment Details
Conan profile
Configuration (profile_host): [settings] arch=x86_64 arch_build=x86_64 build_type=Debug compiler=Visual Studio compiler.runtime=MDd compiler.version=17 os=Windows os_build=Windows [options] libcurl:with_ssl=openssl [build_requires] [env]
Configuration (profile_build): [settings] arch=x86_64 arch_build=x86_64 build_type=Release compiler=Visual Studio compiler.runtime=MD compiler.version=17 os=Windows os_build=Windows [options] [build_requires] [env]
Steps to reproduce
conan install libcurl/8.0.1@ -s build_type=Debug -pr:b=default -pr:h=default --build=missing --update -o with_c_ares=True
Logs
Click to expand log
``` libcurl/8.0.1: Copying sources to build folder libcurl/8.0.1: Building your package in C:\Users\_\.conan\data\libcurl\8.0.1\_\_\build\6962e5555191b0f8cd70795c0ffd574d19c1c001 libcurl/8.0.1: Generator txt created conanbuildinfo.txt libcurl/8.0.1: Calling generate() libcurl/8.0.1: Preset 'default' added to CMakePresets.json. Invoke it manually using 'cmake --preset default' libcurl/8.0.1: If your CMake version is not compatible with CMakePresets (<3.19) call cmake like: 'cmake