mirror of
https://github.com/curl/curl.git
synced 2025-09-27 22:47:00 +03:00
CMakeLists.txt: fix Windows LDAP/LDAPS option handling
bug: http://curl.haxx.se/mail/lib-2012-03/0278.html
This commit is contained in:
parent
7d1b715605
commit
66c0e26e28
|
@ -113,22 +113,11 @@ mark_as_advanced(CURL_DISABLE_HTTP)
|
||||||
|
|
||||||
option(CURL_DISABLE_LDAPS "to disable LDAPS" OFF)
|
option(CURL_DISABLE_LDAPS "to disable LDAPS" OFF)
|
||||||
mark_as_advanced(CURL_DISABLE_LDAPS)
|
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)
|
if(HTTP_ONLY)
|
||||||
set(CURL_DISABLE_FTP ON)
|
set(CURL_DISABLE_FTP ON)
|
||||||
set(CURL_DISABLE_LDAP ON)
|
set(CURL_DISABLE_LDAP ON)
|
||||||
|
set(CURL_DISABLE_LDAPS ON)
|
||||||
set(CURL_DISABLE_TELNET ON)
|
set(CURL_DISABLE_TELNET ON)
|
||||||
set(CURL_DISABLE_DICT ON)
|
set(CURL_DISABLE_DICT ON)
|
||||||
set(CURL_DISABLE_FILE 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_concat("winmm" getch HAVE_LIBWINMM)
|
||||||
check_library_exists("wldap32" cldap_open "" HAVE_WLDAP32)
|
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)
|
# IF(NOT CURL_SPECIAL_LIBZ)
|
||||||
# CHECK_LIBRARY_EXISTS_CONCAT("z" inflateEnd HAVE_LIBZ)
|
# CHECK_LIBRARY_EXISTS_CONCAT("z" inflateEnd HAVE_LIBZ)
|
||||||
# ENDIF(NOT CURL_SPECIAL_LIBZ)
|
# ENDIF(NOT CURL_SPECIAL_LIBZ)
|
||||||
|
@ -387,6 +390,13 @@ if(NOT HAVE_LDAP_H)
|
||||||
set(CURL_DISABLE_LDAP ON CACHE BOOL "" FORCE)
|
set(CURL_DISABLE_LDAP ON CACHE BOOL "" FORCE)
|
||||||
endif()
|
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(size_t SIZEOF_SIZE_T)
|
||||||
check_type_size(ssize_t SIZEOF_SSIZE_T)
|
check_type_size(ssize_t SIZEOF_SSIZE_T)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user