Skip to content

Commit

Permalink
Fix CPR variable name
Browse files Browse the repository at this point in the history
After trying to use CPR 1.10.0 first, which uses a new variable name, we had to move back to 1.8.3, which works well with the system libcurl on Ubuntu bionic.
  • Loading branch information
TheAssassin committed Mar 3, 2023
1 parent cb6ce63 commit dc43891
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ if(NOT USE_SYSTEM_CPR)
# see
find_package(CURL)
if(CURL_FOUND)
message(STATUS "Found libcurl CURL_VERSION_STRING")
message(STATUS "Found libcurl ${CURL_VERSION_STRING}")

if(NOT DEFINED CPR_USE_SYSTEM_CURL)
if(NOT DEFINED CPR_FORCE_USE_SYSTEM_CURL)
if (CURL_VERSION_STRING VERSION_LESS_EQUAL 7.80.0)
message(STATUS "libcurl is old enough to work with CPR, so we use the system one (use -DCPR_USE_SYSTEM_CURL=OFF to change this behavior)")
set(CPR_USE_SYSTEM_CURL ON)
message(STATUS "libcurl is old enough to work with CPR, so we use the system one (use -DCPR_FORCE_USE_SYSTEM_CURL=OFF to change this behavior)")
set(CPR_FORCE_USE_SYSTEM_CURL ON)
else()
message(WARNING "libcurl is too new to work with CPR, so we let CPR build its own (use -DCPR_USE_SYSTEM_CURL=ON to change this behavior)")
set(CPR_USE_SYSTEM_CURL ON)
message(WARNING "libcurl is too new to work with CPR, so we let CPR build its own (use -DCPR_FORCE_USE_SYSTEM_CURL=ON to change this behavior)")
set(CPR_FORCE_USE_SYSTEM_CURL ON)
endif()
else()
message(WARNING "CPR_USE_SYSTEM_CURL is set to ${CPR_USE_SYSTEM_CURL} by the user")
Expand Down

0 comments on commit dc43891

Please sign in to comment.