Skip to content

Instantly share code, notes, and snippets.

@israeljrs
Last active September 19, 2017 13:39
Show Gist options
  • Save israeljrs/ddd08acda6894b0870d316ea22653e1a to your computer and use it in GitHub Desktop.
Save israeljrs/ddd08acda6894b0870d316ea22653e1a to your computer and use it in GitHub Desktop.
Exemplo de CMakeLists.txt para compilar a libcurl
cmake_minimum_required (VERSION 2.8.11)
project (HTTPG)
file(GLOB_RECURSE SOURCES src/*.c)
add_executable (httpg ${SOURCES})
set(EXECUTABLE_OUTPUT_PATH "bin")
find_package (CURL)
if (CURL_FOUND)
include_directories(${CURL_INCLUDE_DIRS})
target_link_libraries(httpg ${CURL_LIBRARIES})
else()
MESSAGE(FATAL_ERROR "LibCurl is not found in your system.")
endif (CURL_FOUND)
target_link_libraries(httpg ${LIBS})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment