FindCURL: Can not find debug library in Windows
Request: Cloud you fix FindCURL.cmake to find libcurl-d_imp.lib
in Windows installation?
Problem description: As in vcpkg project ports script express at https://github.com/Microsoft/vcpkg/blob/master/ports/curl/portfile.cmake#L115 , find_package(CURL MODULE) could not find a debug library in Windows.
Vcpkg project renames a installed debug library but it cause another problem which is reported in https://github.com/Microsoft/vcpkg/issues/3053 , that it break find_package(CURL CONFIG).
It is because CMakeLists.txt in curl project produce curl-config.cmake
that report library filename is libcurl-d_imp.lib
.
repro: Build with debug configuration and install curl in Windows using MSVC and cmake. You will find a libcurl-d_imp.lib
installed. creating test project to find_package(CURL MODULE)
, then it can not find a curl.
Cause: FindCURL does not try finding debug library libcurl-d_imp.lib
. It should add suffix hint -d
and _imp
to find_library
command.