diff options
author | tetetest tetetest <tetetest@rambler.ru> | 2012-03-30 18:59:47 +0200 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2012-03-30 19:03:12 +0200 |
commit | 66c0e26e284c65f5e78e3531c6464b5f8ac3e9fd (patch) | |
tree | 17d439d9874ee9d14f8eacfac54c1fc276e99367 | |
parent | 7d1b715605d4ae4970851ee1439740efe9ac04fe (diff) |
CMakeLists.txt: fix Windows LDAP/LDAPS option handling
bug: http://curl.haxx.se/mail/lib-2012-03/0278.html
-rw-r--r-- | CMakeLists.txt | 34 |
1 files changed, 22 insertions, 12 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 5d60a56a5..9b3ffe3ca 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -113,22 +113,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 +210,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 +390,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) |