diff --git a/CMakeLists.txt b/CMakeLists.txt index 5b2427d4f3..e60fbd5b84 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -680,10 +680,8 @@ if(NOT CURL_DISABLE_LDAP) if(WIN32) option(USE_WIN32_LDAP "Use Windows LDAP implementation" ON) if(USE_WIN32_LDAP) - check_library_exists_concat("wldap32" cldap_open HAVE_WLDAP32) - if(NOT HAVE_WLDAP32) - set(USE_WIN32_LDAP OFF) - elseif(NOT CURL_DISABLE_LDAPS) + list(APPEND CURL_LIBS "wldap32") + if(NOT CURL_DISABLE_LDAPS) set(HAVE_LDAP_SSL ON) endif() endif()