From 803ea7b14365c05b437dfb616c7c4cc1b891ba16 Mon Sep 17 00:00:00 2001 From: Florent Castelli Date: Tue, 24 Jan 2017 04:02:39 +0100 Subject: [PATCH] cmake: Fix curl build for Windows --- Externals/curl/lib/CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Externals/curl/lib/CMakeLists.txt b/Externals/curl/lib/CMakeLists.txt index b5bce4964c..00b6a7c2cc 100644 --- a/Externals/curl/lib/CMakeLists.txt +++ b/Externals/curl/lib/CMakeLists.txt @@ -1,6 +1,7 @@ -set(LIB_NAME libcurl) +if(NOT CMAKE_SYSTEM_NAME MATCHES "Windows") + add_definitions(-DHAVE_CONFIG_H) +endif() -add_definitions(-DHAVE_CONFIG_H) include_directories(.) file(GLOB SRCS *.c vauth/*.c vtls/*.c) @@ -11,3 +12,4 @@ add_library( ) target_link_libraries(curl ${MBEDTLS_LIBRARIES}) +target_compile_definitions(curl PUBLIC CURL_STATICLIB PRIVATE CURL_DISABLE_LDAP)