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)
+#if(UNIX)
+# 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)
+#else(UNIX)
+# FIND_PATH(LDAP_INCLUDE_DIR winldap.h)
+# FIND_LIBRARY(LDAP_LIBRARIES NAMES wldap32)
+#endif(UNIX)
if(LDAP_INCLUDE_DIR AND LDAP_LIBRARIES)
set(LDAP_FOUND TRUE)
#include "network.h"
#include "quassel.h"
-// Link against LDAP.
+/* We should use openldap on windows if at all possible, rather than trying to
+ * write some kind of compatiblity routine.
+#ifdef Q_CC_MSVC
+#include <windows.h>
+#include <winldap.h>
+#else*/
#include <ldap.h>
+//#endif
LdapAuthenticator::LdapAuthenticator(QObject *parent)
: Authenticator(parent),
#include "core.h"
// Link against LDAP.
+/* We should use openldap on windows if at all possible, rather than trying to
+ * write some kind of compatiblity routine.
+#ifdef Q_CC_MSVC
+#include <windows.h>
+#include <winldap.h>
+#else*/
#include <ldap.h>
+//#endif
// Default LDAP server port.
#define DEFAULT_LDAP_PORT 389