0

I use C++, curl 7.64, CMake 3.19.3, curlpp 0.8.1, Windows 7 OS. I cannot build curlpp out-of-the-box. CURL_FOUND is set to true, but CURL_INCLUDE_DIRS and CURL_LIBRARIES are empty (AFAIK, CMake module delegates variables filling to curl CMake module).

I've set CURL_INCLUDE_DIRS manually, but setting CURL_LIBRARIES="debug "path_to_debug" optimized "path_to_release"" fails. So, I've got linker errors.

BTW, why do some curl-consuming CMakeLists.txt files use ${CURL_LIBRARIES} and the other ones use CURL::libcurl for feeding target_link_libraries?

ilya
  • 1,103
  • 14
  • 36
  • 1
    Have you read CMake documentation about [FindCURL](https://cmake.org/cmake/help/latest/module/FindCURL.html) module? In the last paragraph they explain, that if CURL is built with CMake, then it provides Config file, and `find_package(CURL)` just processes this file. The Config file provides only `CURL::curl` imported target, without variable like `CURL_INCLUDE_DIRS` and `CURL_LIBRARIES`. – Tsyvarev Jan 20 '21 at 13:17
  • OK, but curlpp relies on these variables. Is it possible to build dynamic and static curlpp without patching curlpp CMakeLists.txt? – ilya Jan 20 '21 at 17:28
  • So, is curlpp author's approach with `CURL_INCLUDE_DIRS` and `CURL_LIBRARIES` obsolete? – ilya Jan 20 '21 at 17:30

0 Answers0