Setting up curl library path in cmake

后端 未结 3 1921
终归单人心
终归单人心 2020-12-31 06:07

I downloaded \"curl library\" for use with a third party application. When I run the included cmake file, I get the following error. Please help me. I appreciate it:

3条回答
  •  無奈伤痛
    2020-12-31 06:43

    via pkgconfig

    include(FindPkgConfig)
    pkg_check_modules(CURL libcurl REQUIRED)
    include_directories(
      SYSTEM ${CURL_INCLUDE_DIRS}
    )
    target_link_libraries(YOURTARGETNAME
      ${CURL_LIBRARIES}
    )
    

提交回复
热议问题