File tree Expand file tree Collapse file tree
include/launchdarkly/network Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,7 +49,6 @@ set(INTERNAL_SOURCES
4949
5050if (LD_CURL_NETWORKING)
5151 message (STATUS "LaunchDarkly Internal: CURL networking enabled" )
52- find_package (CURL REQUIRED )
5352 list (APPEND INTERNAL_SOURCES network/curl_requester.cpp)
5453endif ()
5554
@@ -70,7 +69,7 @@ target_link_libraries(${LIBNAME}
7069 PRIVATE Boost::url Boost::json OpenSSL::SSL Boost::disable_autolinking Boost::headers tl::expected foxy )
7170
7271if (LD_CURL_NETWORKING)
73- target_link_libraries (${LIBNAME} PRIVATE CURL::libcurl launchdarkly::networking )
72+ target_link_libraries (${LIBNAME} PRIVATE launchdarkly::networking )
7473 target_compile_definitions (${LIBNAME} PRIVATE LD_CURL_NETWORKING )
7574endif ()
7675
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ class CurlMultiManager : public std::enable_shared_from_this<CurlMultiManager> {
6060 * @param headers The curl_slist headers (will be freed automatically)
6161 * @param callback Called when the transfer completes
6262 */
63- void add_handle (std::shared_ptr<CURL > easy,
63+ void add_handle (const std::shared_ptr<CURL >& easy,
6464 curl_slist* headers,
6565 CompletionCallback callback);
6666
Original file line number Diff line number Diff line change @@ -15,9 +15,10 @@ add_library(launchdarkly::networking ALIAS ${LIBNAME})
1515message (STATUS "LaunchDarklyNetworking_SOURCE_DIR=${LaunchDarklyNetworking_SOURCE_DIR } " )
1616
1717target_link_libraries (${LIBNAME}
18+ PUBLIC
19+ CURL::libcurl
1820 PRIVATE
1921 Boost::headers
20- CURL::libcurl
2122 Boost::disable_autolinking
2223)
2324
Original file line number Diff line number Diff line change @@ -42,13 +42,11 @@ CurlMultiManager::~CurlMultiManager() {
4242 header_it != headers_.end () && header_it->second ) {
4343 curl_slist_free_all (header_it->second );
4444 }
45-
46- // curl_easy_cleanup(easy);
4745 }
4846 }
4947}
5048
51- void CurlMultiManager::add_handle (std::shared_ptr<CURL > easy,
49+ void CurlMultiManager::add_handle (const std::shared_ptr<CURL >& easy,
5250 curl_slist* headers,
5351 CompletionCallback callback) {
5452 if (const CURLMcode rc = curl_multi_add_handle (
Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ set(SSE_SOURCES
1616
1717if (LD_CURL_NETWORKING)
1818 message (STATUS "LaunchDarkly SSE: CURL networking enabled" )
19- find_package (CURL REQUIRED )
2019 list (APPEND SSE_SOURCES curl_client.cpp)
2120endif ()
2221
@@ -28,7 +27,7 @@ target_link_libraries(${LIBNAME}
2827)
2928
3029if (LD_CURL_NETWORKING)
31- target_link_libraries (${LIBNAME} PRIVATE CURL::libcurl launchdarkly::networking )
30+ target_link_libraries (${LIBNAME} PRIVATE launchdarkly::networking )
3231 target_compile_definitions (${LIBNAME} PRIVATE LD_CURL_NETWORKING )
3332endif ()
3433
You can’t perform that action at this time.
0 commit comments