X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=cmake%2FFindLdap.cmake;h=5532547888e4753263ea640fe290c22813539eae;hb=7fccb74ec00f505d3a5485ad9592c37248c1e8c6;hp=e29d6a2adf7ae511a88e4772bc7ddadb510e13ba;hpb=61aac1868f15babb7086d8bc6bbcff530346f438;p=quassel.git diff --git a/cmake/FindLdap.cmake b/cmake/FindLdap.cmake index e29d6a2a..55325478 100644 --- a/cmake/FindLdap.cmake +++ b/cmake/FindLdap.cmake @@ -13,15 +13,17 @@ if(LDAP_INCLUDE_DIR AND LDAP_LIBRARIES) set(Ldap_FIND_QUIETLY TRUE) endif(LDAP_INCLUDE_DIR AND LDAP_LIBRARIES) -if(UNIX) - FIND_PATH(LDAP_INCLUDE_DIR ldap.h) - FIND_LIBRARY(LDAP_LIBRARIES NAMES ldap) - FIND_LIBRARY(LBER_LIBRARIES NAMES lber) +# Attempt to link against ldap.h regardless of platform! +FIND_PATH(LDAP_INCLUDE_DIR ldap.h) +FIND_LIBRARY(LDAP_LIBRARIES NAMES ldap) +FIND_LIBRARY(LBER_LIBRARIES NAMES lber) -else(UNIX) - FIND_PATH(LDAP_INCLUDE_DIR winldap.h) - FIND_LIBRARY(LDAP_LIBRARIES NAMES wldap32) -endif(UNIX) +# It'd be nice to link against winldap on Windows, unfortunately +# the interfaces are different. In theory a compatibility shim +# could be written; if someone ever gets around to doing that these +# lines should be uncommented and used on Windows. +# FIND_PATH(LDAP_INCLUDE_DIR winldap.h) +# FIND_LIBRARY(LDAP_LIBRARIES NAMES wldap32) if(LDAP_INCLUDE_DIR AND LDAP_LIBRARIES) set(LDAP_FOUND TRUE)