cmake: Add detection of slapi library without base slapi.so.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 2f07f1237e)
r14.0.x
Slávek Banko 6 years ago
parent 77208228c9
commit 9ee976924c
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -42,12 +42,27 @@ endif( HAVE_LIBLDAP )
##### check for openldap-server
find_library( HAVE_SLAPI slapi )
if( HAVE_SLAPI )
set( SLAPI_LIBRARIES slapi )
else()
tde_message_fatal( "The slapi library ( openldap-server ) is required, but was not found on your system" )
endif( HAVE_SLAPI )
if( NOT DEFINED SLAPI_LIBRARIES )
message( STATUS "Looking for slapi library" )
find_library( HAVE_SLAPI slapi )
if( HAVE_SLAPI )
set( SLAPI_LIBRARIES slapi )
else()
get_filename_component( LDAP_LIBDIR ${HAVE_LIBLDAP} PATH CACHE )
file( GLOB LIBSLAPI_FILES
${LDAP_LIBDIR}/${CMAKE_SHARED_LIBRARY_PREFIX}slapi-[0-9]*${CMAKE_SHARED_LIBRARY_SUFFIX}
${LDAP_LIBDIR}/${CMAKE_SHARED_LIBRARY_PREFIX}slapi-[0-9]*${CMAKE_SHARED_LIBRARY_SUFFIX}.[0-9]*
/usr/lib/${CMAKE_SHARED_LIBRARY_PREFIX}slapi-[0-9]*${CMAKE_SHARED_LIBRARY_SUFFIX}
/usr/lib/${CMAKE_SHARED_LIBRARY_PREFIX}slapi-[0-9]*${CMAKE_SHARED_LIBRARY_SUFFIX}.[0-9]*
)
if( LIBSLAPI_FILES )
list( GET LIBSLAPI_FILES 0 SLAPI_LIBRARIES )
else( )
tde_message_fatal( "The slapi library ( openldap-server ) is required, but was not found on your system" )
endif( )
endif( HAVE_SLAPI )
message( STATUS "Looking for slapi library - found ${SLAPI_LIBRARIES}" )
endif( )
##### check for tdeldap

Loading…
Cancel
Save