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-27 20:20:20 +0100 |
commit | cfa79f06e225942d19903b52cc2ed74e966d3c3f (patch) | |
tree | 9b9cd88f300a81e80e511bba11d59c224f2a2c93 /CMakeLists.txt | |
parent | 4e6b9128f722d7a45188b2c2fc3ecdb887de6cc9 (diff) | |
download | tdelibs-cfa79f06e225942d19903b52cc2ed74e966d3c3f.tar.gz tdelibs-cfa79f06e225942d19903b52cc2ed74e966d3c3f.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>
(cherry picked from commit 8a859540c3cb306844288144a06028dc302408d6)
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 0dddcafe2..8763e250a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -124,6 +124,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 ) |