summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2019-02-23 16:35:21 +0100
committerSlávek Banko <slavek.banko@axis.cz>2019-02-27 20:18:17 +0100
commit33c3818ac59fda3a00b7cff19fd3b1f09296fe5d (patch)
tree0d5d3e3353303d875922d428ae28464e9d121930 /CMakeLists.txt
parent89609911f85667e0e46b89e15023081cd6724677 (diff)
downloadtdelibs-33c3818ac59fda3a00b7cff19fd3b1f09296fe5d.tar.gz
tdelibs-33c3818ac59fda3a00b7cff19fd3b1f09296fe5d.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.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b90edfa94..9cd1fdb55 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -137,6 +137,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 )