Skip to content

Commit

Permalink
flag to find curl package without using cmake config (#1879)
Browse files Browse the repository at this point in the history
  • Loading branch information
kpedro88 authored Aug 11, 2020
1 parent 4329889 commit be98e96
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion c++/library/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,11 @@ if(${TRITON_ENABLE_HTTP})
#
# libhttpclient.so and libhttpclient_static.a
#
find_package(CURL CONFIG REQUIRED)
if(${TRITON_CURL_WITHOUT_CONFIG})
find_package(CURL REQUIRED)
else()
find_package(CURL CONFIG REQUIRED)
endif() # TRITON_CURL_WITHOUT_CONFIG
message(STATUS "Using curl ${CURL_VERSION}")
add_definitions(-DCURL_STATICLIB)

Expand Down
6 changes: 5 additions & 1 deletion c++/library/cmake/TRITONConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ if(NOT GRPC_FOUND AND NOT gRPC_FOUND)
endif()

if(NOT CURL_FOUND)
find_package(CURL CONFIG REQUIRED)
if(${TRITON_CURL_WITHOUT_CONFIG})
find_package(CURL REQUIRED)
else()
find_package(CURL CONFIG REQUIRED)
endif() # TRITON_CURL_WITHOUT_CONFIG
endif()

if(NOT Threads_FOUND)
Expand Down

0 comments on commit be98e96

Please sign in to comment.