Closed Blackflame576 closed 1 year ago
cmake_minimum_required (VERSION 3.8) project("CURL-DEMO") set(CURL_LIBRARY "-lcurl") set(CURL_INCLUDE_DIR " ${CMAKE_SOURCE_DIR}/PATH_FROM_ROOTproject_TO_CURL-x.x.x/include") find_package(CURL REQUIRED) set(HEADERS "test.h" ) set(SOURCES "test.cpp" "main.cpp" ) include_directories(${CURL_INCLUDE_DIR}) add_executable(CURL-DEMO ${HEADERS} ${SOURCES}) if(LIBCURL_ENABLE) target_link_libraries(CURL-DEMO CURL::libcurl) endif()