aboutsummaryrefslogtreecommitdiff
path: root/cmake/Modules/FindCURL.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/Modules/FindCURL.cmake')
-rw-r--r--cmake/Modules/FindCURL.cmake19
1 files changed, 8 insertions, 11 deletions
diff --git a/cmake/Modules/FindCURL.cmake b/cmake/Modules/FindCURL.cmake
index 2ec866ef9..43aaf3e18 100644
--- a/cmake/Modules/FindCURL.cmake
+++ b/cmake/Modules/FindCURL.cmake
@@ -1,19 +1,16 @@
mark_as_advanced(CURL_LIBRARY CURL_INCLUDE_DIR)
-find_library(CURL_LIBRARY NAMES curl)
+find_library(CURL_LIBRARY NAMES curl libcurl)
find_path(CURL_INCLUDE_DIR NAMES curl/curl.h)
-set(CURL_REQUIRED_VARS CURL_LIBRARY CURL_INCLUDE_DIR)
-
if(WIN32)
- find_file(CURL_DLL NAMES libcurl-4.dll
- PATHS
- "C:/Windows/System32"
- DOC "Path to the cURL DLL (for installation)")
- mark_as_advanced(CURL_DLL)
- set(CURL_REQUIRED_VARS ${CURL_REQUIRED_VARS} CURL_DLL)
+ # If VCPKG_APPLOCAL_DEPS is ON, dll's are automatically handled by VCPKG
+ if(NOT VCPKG_APPLOCAL_DEPS)
+ find_file(CURL_DLL NAMES libcurl-4.dll libcurl.dll
+ DOC "Path to the cURL DLL (for installation)")
+ mark_as_advanced(CURL_DLL)
+ endif()
endif()
include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(CURL DEFAULT_MSG ${CURL_REQUIRED_VARS})
-
+find_package_handle_standard_args(CURL DEFAULT_MSG CURL_LIBRARY CURL_INCLUDE_DIR)