Skip to content

Commit 58eaaa7

Browse files
committed
Test fix
1 parent 3991440 commit 58eaaa7

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

CMakeLists.txt

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff 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()

environment-dev.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)