From 582c8f01230ba3c74d2088612cde3eba1971522e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Sun, 2 Jun 2019 17:07:21 +0200 Subject: [PATCH] Fix heimdal detection on multiarch systems in case the pkg-config file is not available. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- ConfigureChecks.cmake | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 0a645e9..24e2a7a 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -26,6 +26,18 @@ if( WITH_GCC_VISIBILITY ) endif( WITH_GCC_VISIBILITY ) +##### get the system's default path for libraries + +tde_save_and_set( CMAKE_INSTALL_PREFIX "/usr" ) +include( GNUInstallDirs OPTIONAL ) +if( CMAKE_INSTALL_LIBDIR ) + set( SYSTEM_LIBDIR "${CMAKE_INSTALL_LIBDIR}" ) +else( ) + set( SYSTEM_LIBDIR "lib${LIB_SUFFIX}" ) +endif( ) +tde_restore( CMAKE_INSTALL_PREFIX ) + + ##### check for ldap find_library( HAVE_LIBLDAP ldap ) @@ -76,7 +88,9 @@ endif( ) find_path( HEIMDAL_LIBDIR NAMES libhdb.so - HINTS ${KRB5_LIBRARY_DIRS} ${KRB5_LIBDIR} /usr/lib + HINTS + ${KRB5_LIBRARY_DIRS} ${KRB5_LIBDIR} + /usr/${SYSTEM_LIBDIR} /usr/local/${SYSTEM_LIBDIR} PATH_SUFFIXES "heimdal" ) if( NOT "${HEIMDAL_LIBDIR}" STREQUAL "${KRB5_LIBDIR}" )