CMakeLists.txt 996 字节
Newer Older
O
overweight 已提交
1 2 3 4 5 6 7
# set sources and headers for libhttpclient
aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR} http_client_srcs)

if (NOT OPENSSL_VERIFY)
    list(REMOVE_ITEM http_client_srcs "${CMAKE_CURRENT_SOURCE_DIR}/certificate.c")
endif()

8 9 10
add_library(libhttpclient ${LIBTYPE} ${http_client_srcs}
    ${CMAKE_SOURCE_DIR}/src/utils/buffer/buffer.c
    )
O
overweight 已提交
11 12

target_include_directories(libhttpclient PUBLIC 
L
lifeng68 已提交
13
    ${CMAKE_SOURCE_DIR}/src/common
L
lifeng68 已提交
14 15 16
    ${CMAKE_SOURCE_DIR}/src/utils
    ${CMAKE_SOURCE_DIR}/src/utils/cutils
    ${CMAKE_SOURCE_DIR}/src/utils/http
17
    ${CMAKE_SOURCE_DIR}/src/utils/buffer
O
overweight 已提交
18 19 20 21 22
    ${CHECKED_INCLUDE_DIRS}
    )

# set libhttpclient FLAGS
set_target_properties(libhttpclient PROPERTIES PREFIX "")
W
wujing 已提交
23
target_link_libraries(libhttpclient ${HTTP_PARSER_LIBRARY} ${CURL_LIBRARY})
O
overweight 已提交
24 25 26 27 28 29 30

if (ISULAD_GCOV)
    target_link_libraries(libhttpclient -lgcov)
endif()

install(TARGETS libhttpclient 
    LIBRARY DESTINATION ${LIB_INSTALL_DIR_DEFAULT} PERMISSIONS OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE)