I found a curl shell and try to "build" it. What I did:

git submodule add https://github.com/whoshuu/cpr.git git submodule update --init --recursive 

I work with visual studio 2017. I created a regular console application (not CMake).

I do not understand the algorithm, what should I do next to #include <cpr/cpr.h> - it does not glow red.

I tried to create CMakeLists.txt and write the data lines there, but nothing happened.

Next, add this subdirectory to your CMakeLists.txt before using it:

 add_subdirectory(cpr) 

This will produce two important CMake variables, CPR_INCLUDE_DIRS and CPR_LIBRARIES , and

 include_directories(${CPR_INCLUDE_DIRS}) target_link_libraries(your_target_name ${CPR_LIBRARIES}) 

I get the message:

 CMake Error at CMakeLists.txt:13 (project): Running 'C:/Program Files/Microsoft Visual Studio/2017/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe' '--version' failed with: Версия "%1" не совместима с версией Windows, работающей на этом компьютере. Проверьте сведения о системе, чтобы узнать, какая версия программы x86 (32-разрядная) или x64 (64-разрядная) вам нужна, и получите ее у поставщика программного обеспечения. 
  • 2
    As usual, in the compiler settings you set paths to the library header files and preprocessor directives to control it, in the linker settings you set the paths to the export or static libraries of this library and specify their names. with CMAKE, the same is done by forwarding these values ​​through a system of magic macros. - VTT
  • @VTT, you convinced me to download SMake. - Awesome Man
  • Everything is easier, you need to download the 32-bit version of Cmake :) what you downloaded from you does not start at all - NewView
  • @NewView Judging by the question, the OP "tried to create CMakeLists.txt" when he had no cmake at all. - VTT
  • CMake is fine, this is a ninja of the wrong architecture. But since you are working in a studio, you need to generate a studio project, and ninja files. - arrowd

0