Skip to content

Commit

Permalink
Link against CURL_LIBRARIES instead of CURL::libcurl (#776)
Browse files Browse the repository at this point in the history
  • Loading branch information
lidavidm authored May 23, 2021
1 parent 7374de8 commit 5a1b189
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ext/src/http/client/curl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ if(CURL_FOUND)
set_target_properties(http_client_curl PROPERTIES EXPORT_NAME
http_client_curl)

target_link_libraries(http_client_curl PUBLIC CURL::libcurl)
if(TARGET CURL::libcurl)
target_link_libraries(http_client_curl PUBLIC CURL::libcurl)
else()
include_directories(${CURL_INCLUDE_DIRS})
target_link_libraries(http_client_curl PUBLIC ${CURL_LIBRARIES})
endif()

install(
TARGETS http_client_curl
Expand Down

0 comments on commit 5a1b189

Please sign in to comment.