diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2019-02-23 16:35:21 +0100 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2019-02-24 04:22:56 +0100 |
commit | 8a859540c3cb306844288144a06028dc302408d6 (patch) | |
tree | ab30cacb69adc9e2419162224d5cfa9bddeb11b7 /CMakeLists.txt | |
parent | c49ee53043b73fac7fe7e956360f1e3cdc342c6e (diff) | |
download | tdelibs-8a859540c3cb306844288144a06028dc302408d6.tar.gz tdelibs-8a859540c3cb306844288144a06028dc302408d6.zip |
Use system libdir when searching for dynamically loaded libraries.
This prevents finding an incorrect architecture on multi-arch systems.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index d28a2ad6b..0b3541bde 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -141,6 +141,18 @@ if( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" ) endif( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" ) +##### 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 compiler capabilities ########### include( CheckCXXCompilerFlag ) |