summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2018-09-11 02:59:04 +0200
committerSlávek Banko <slavek.banko@axis.cz>2021-12-10 15:08:27 +0100
commit4fd4c885fc2b7eac1074a9ee05b04ea523ce9830 (patch)
tree49d26c436e7884c1e9ff157479b73d31ef043ab2
parentadba96aa2b53bb7b8cfd3aa8f3e53ffa09cfcabe (diff)
downloadtqtinterface-4fd4c885fc2b7eac1074a9ee05b04ea523ce9830.tar.gz
tqtinterface-4fd4c885fc2b7eac1074a9ee05b04ea523ce9830.zip
cmake: Install libraries according to multi-arch rules
Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit 88e7ccc71663e364d6f433adc6281482bc964795)
-rw-r--r--CMakeLists.txt7
1 files changed, 6 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 75c0e49..29f3ceb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -31,6 +31,7 @@ include( CheckIncludeFile )
include( CheckLibraryExists )
include( CheckCSourceCompiles )
include( CheckCXXSourceCompiles )
+include( GNUInstallDirs OPTIONAL )
##### include our cmake modules
@@ -43,7 +44,11 @@ include( TDEMacros )
tde_setup_install_path( EXEC_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}" )
tde_setup_install_path( BIN_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/bin" )
-tde_setup_install_path( LIB_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX}" )
+if( CMAKE_INSTALL_LIBDIR )
+ tde_setup_install_path( LIB_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}" )
+else( )
+ tde_setup_install_path( LIB_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX}" )
+endif( )
tde_setup_install_path( INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include/tqt" )
tde_setup_install_path( PKGCONFIG_INSTALL_DIR "${LIB_INSTALL_DIR}/pkgconfig" )