diff options
author | Alessandro Ghedini <al3xbio@gmail.com> | 2012-05-24 19:57:30 +0200 |
---|---|---|
committer | Alessandro Ghedini <al3xbio@gmail.com> | 2012-05-24 19:57:30 +0200 |
commit | 595b4c92a848f9e6e93c6050ad2ff56b130a8ccb (patch) | |
tree | 824786af0786e0c3af3aad4c0ce1f8dfdd63d554 /CMakeLists.txt | |
parent | c1521024d33ba639a8d66385e30355ebbdff4705 (diff) |
Imported Upstream version 7.26.0
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 42 |
1 files changed, 24 insertions, 18 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 88dd1ee6..e571e556 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -57,10 +57,6 @@ set(OS "\"${CMAKE_SYSTEM_NAME}\"") include_directories(${PROJECT_BINARY_DIR}/include/curl) include_directories( ${CURL_SOURCE_DIR}/include ) -if(WIN32) - set(NATIVE_WINDOWS ON) -endif() - option(BUILD_CURL_EXE "Set to ON to build cURL executable." ON) option(BUILD_CURL_TESTS "Set to ON to build cURL tests." ON) option(CURL_STATICLIB "Set to ON to build libcurl with static linking." OFF) @@ -113,22 +109,11 @@ mark_as_advanced(CURL_DISABLE_HTTP) option(CURL_DISABLE_LDAPS "to disable LDAPS" OFF) mark_as_advanced(CURL_DISABLE_LDAPS) -if(WIN32) - set(CURL_DEFAULT_DISABLE_LDAP OFF) - # some windows compilers do not have wldap32 - if( NOT HAVE_WLDAP32) - set(CURL_DISABLE_LDAP ON CACHE BOOL "" FORCE) - message(STATUS "wldap32 not found CURL_DISABLE_LDAP set ON") - option(CURL_LDAP_WIN "Use Windows LDAP implementation" OFF) - else() - option(CURL_LDAP_WIN "Use Windows LDAP implementation" ON) - endif() - mark_as_advanced(CURL_LDAP_WIN) -endif() if(HTTP_ONLY) set(CURL_DISABLE_FTP ON) set(CURL_DISABLE_LDAP ON) + set(CURL_DISABLE_LDAPS ON) set(CURL_DISABLE_TELNET ON) set(CURL_DISABLE_DICT ON) set(CURL_DISABLE_FILE ON) @@ -221,6 +206,20 @@ check_library_exists_concat("ws2_32" getch HAVE_LIBWS2_32) check_library_exists_concat("winmm" getch HAVE_LIBWINMM) check_library_exists("wldap32" cldap_open "" HAVE_WLDAP32) +if(WIN32) + set(CURL_DEFAULT_DISABLE_LDAP OFF) + # some windows compilers do not have wldap32 + if(NOT HAVE_WLDAP32) + set(CURL_DISABLE_LDAP ON CACHE BOOL "" FORCE) + message(STATUS "wldap32 not found CURL_DISABLE_LDAP set ON") + option(CURL_LDAP_WIN "Use Windows LDAP implementation" OFF) + else() + option(CURL_LDAP_WIN "Use Windows LDAP implementation" ON) + endif() + mark_as_advanced(CURL_LDAP_WIN) +endif() + + # IF(NOT CURL_SPECIAL_LIBZ) # CHECK_LIBRARY_EXISTS_CONCAT("z" inflateEnd HAVE_LIBZ) # ENDIF(NOT CURL_SPECIAL_LIBZ) @@ -387,6 +386,13 @@ if(NOT HAVE_LDAP_H) set(CURL_DISABLE_LDAP ON CACHE BOOL "" FORCE) endif() +# No ldap, no ldaps. +if(CURL_DISABLE_LDAP) + if(NOT CURL_DISABLE_LDAPS) + message(STATUS "LDAP needs to be enabled to support LDAPS") + set(CURL_DISABLE_LDAPS ON CACHE BOOL "" FORCE) + endif() +endif() check_type_size(size_t SIZEOF_SIZE_T) check_type_size(ssize_t SIZEOF_SSIZE_T) @@ -426,7 +432,7 @@ if(SIZEOF_LONG EQUAL 8) set(CURL_FORMAT_CURL_OFF_TU "lu") set(CURL_FORMAT_OFF_T "%ld") set(CURL_SUFFIX_CURL_OFF_T L) - set(CURL_SUFFIX_CURL_OFF_TU LU) + set(CURL_SUFFIX_CURL_OFF_TU UL) endif(SIZEOF_LONG EQUAL 8) if(SIZEOF_LONG_LONG EQUAL 8) @@ -436,7 +442,7 @@ if(SIZEOF_LONG_LONG EQUAL 8) set(CURL_FORMAT_CURL_OFF_TU "llu") set(CURL_FORMAT_OFF_T "%lld") set(CURL_SUFFIX_CURL_OFF_T LL) - set(CURL_SUFFIX_CURL_OFF_TU LLU) + set(CURL_SUFFIX_CURL_OFF_TU ULL) endif(SIZEOF_LONG_LONG EQUAL 8) if(NOT CURL_TYPEOF_CURL_OFF_T) |