looking for libcurl components fails for some installations

This commit is contained in:
Axel Kohlmeyer
2025-04-03 18:46:16 -04:00
parent f447a0476c
commit 1892189eaa

View File

@ -1,9 +1,9 @@
# the geturl command needs libcurl
find_package(CURL QUIET COMPONENTS HTTP HTTPS)
find_package(CURL QUIET)
option(WITH_CURL "Enable libcurl support" ${CURL_FOUND})
if(WITH_CURL)
find_package(CURL REQUIRED COMPONENTS HTTP HTTPS)
find_package(CURL REQUIRED)
target_compile_definitions(lammps PRIVATE -DLAMMPS_CURL)
target_link_libraries(lammps PRIVATE CURL::libcurl)
endif()