File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -346,8 +346,20 @@ macro(xeus_cpp_create_target target_name linkage output_name)
346346 endif ()
347347 elseif (NOT EMSCRIPTEN)
348348 find_package (CURL REQUIRED )
349+
350+ # Add CURL_STATICLIB definition if linking statically
351+ if (CURL_STATICLIB)
352+ target_compile_definitions (${target_name} PUBLIC CURL_STATICLIB )
353+ endif ()
354+
355+ # Link against the correct libcurl target
356+ if (CURL_FOUND)
357+ target_include_directories (${target_name} PRIVATE ${CURL_INCLUDE_DIRS} )
358+ target_link_libraries (${target_name} PRIVATE ${CURL_LIBRARIES} )
359+ endif ()
360+
349361 # Curl initialised specifically for xassist
350- target_link_libraries (${target_name} PUBLIC ${XEUS_CPP_XEUS_TARGET} clangCppInterOp pugixml argparse::argparse curl )
362+ target_link_libraries (${target_name} PUBLIC ${XEUS_CPP_XEUS_TARGET} clangCppInterOp pugixml argparse::argparse CURL::libcurl )
351363 else ()
352364 target_link_libraries (${target_name} PUBLIC ${XEUS_CPP_XEUS_TARGET} clangCppInterOp pugixml argparse::argparse )
353365 endif ()
Original file line number Diff line number Diff line change @@ -15,7 +15,9 @@ dependencies:
1515 - pugixml
1616 - cpp-argparse
1717 - llvm-openmp
18+ - curl
1819 - libcurl
20+ - libcurl-static
1921 # Test dependencies
2022 - pytest
2123 - jupyter_kernel_test<0.8
You can’t perform that action at this time.
0 commit comments