X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=CMakeLists.txt;h=d527ee6bacf2cb9b27870ddb26e034ab933fbac5;hp=e8beb5b4b0571949b5419623074f866ddfc2eb9b;hb=4b0caf61565c8791efba283bbcaf73530b9feafc;hpb=71b32fa06fe8777f7e2d26bc8592f75cf4a3ffe5 diff --git a/CMakeLists.txt b/CMakeLists.txt index e8beb5b4..d527ee6b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -133,6 +133,11 @@ if (LINK_EXTRA) endif() +# List of authenticators and the cmake flags to build them +# (currently that's just LDAP, but more can be added here). +#################################################################### +option(WITH_LDAP "Enable LDAP authentication support if present on system" ON) + # Setup CMake ##################################################################### @@ -514,6 +519,22 @@ if (CMAKE_COMPILER_IS_GNUCXX) string(REPLACE "-ansi" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) endif() +# Setup LDAP Authentication support. +##################################################################### +if(WITH_LDAP) + find_package(Ldap) + if(LDAP_FOUND) + message(STATUS "Enabling LDAP authentication support") + set(HAVE_LDAP true) + if(HAVE_LDAP) + add_definitions(-DHAVE_LDAP) + endif(HAVE_LDAP) + else(LDAP_FOUND) + message(STATUS "Disabling LDAP authentication support") + endif(LDAP_FOUND) +else(WITH_LDAP) + message(STATUS "Not enabling LDAP authentication support") +endif(WITH_LDAP) # Setup KDE / KDE Frameworks #####################################################################