Skip to content

Commit

Permalink
build: use imported curl library
Browse files Browse the repository at this point in the history
  • Loading branch information
Chilledheart committed Dec 19, 2023
1 parent 1fdc6f6 commit 2c7a8d3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4091,6 +4091,9 @@ if (BUILD_TESTS)
endif()
if (MSVC_CURL_EXIST)
message(STATUS "Using existing curl binary: ${CURL_MSVC_DIR}")
add_library(libcurl_a STATIC IMPORTED)
set_property(TARGET libcurl_a PROPERTY
IMPORTED_LOCATION "${CURL_MSVC_DIR}/lib/libcurl_a.lib")
set(CURL_FOUND TRUE)
set(CURL_CFLAGS /DCURL_STATICLIB)
set(CURL_INCLUDE_DIRS ${CURL_MSVC_DIR}/include)
Expand All @@ -4112,7 +4115,11 @@ if (BUILD_TESTS)
endif()
if (MINGW_CURL_EXIST)
message(STATUS "Using existing curl binary: ${CURL_MINGW_DIR}")
add_library(curl STATIC IMPORTED)
set_property(TARGET curl PROPERTY
IMPORTED_LOCATION "${CURL_MINGW_DIR}/lib/libcurl.dll.a")
set(CURL_FOUND TRUE)
#set(CURL_CFLAGS -DCURL_STATICLIB)
set(CURL_INCLUDE_DIRS ${CURL_MINGW_DIR}/include)
set(CURL_LIBRARY_DIRS ${CURL_MINGW_DIR}/lib)
set(CURL_LIBRARIES curl)
Expand Down

0 comments on commit 2c7a8d3

Please sign in to comment.