diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2019-06-02 17:07:21 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2019-06-02 17:14:10 +0200 |
commit | 582c8f01230ba3c74d2088612cde3eba1971522e (patch) | |
tree | d47609fa57b096c38c72aca55bedd33beb342ef5 | |
parent | 1ea2efad30063e5847833df7925ea4652a312f5a (diff) | |
download | libtdeldap-582c8f01230ba3c74d2088612cde3eba1971522e.tar.gz libtdeldap-582c8f01230ba3c74d2088612cde3eba1971522e.zip |
Fix heimdal detection on multiarch systems
in case the pkg-config file is not available.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
-rw-r--r-- | ConfigureChecks.cmake | 16 |
1 files changed, 15 insertions, 1 deletions
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}" ) |