Browse Source

cmake: Install libraries according to multi-arch rules

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Slávek Banko 7 months ago
parent
commit
88e7ccc716
Signed by: Slávek Banko <slavek.banko@axis.cz> GPG Key ID: 608F5293A04BE668
1 changed files with 6 additions and 1 deletions
  1. 6
    1
      CMakeLists.txt

+ 6
- 1
CMakeLists.txt View File

@@ -22,6 +22,7 @@ set( TQT_VERSION "${TQT_MAJOR_VERSION}.${TQT_MINOR_VERSION}.${TQT_MICRO_VERSION}
22 22
 cmake_minimum_required( VERSION 2.8 )
23 23
 
24 24
 include( CheckCXXSourceCompiles )
25
+include( GNUInstallDirs OPTIONAL )
25 26
 
26 27
 
27 28
 ##### include our cmake modules #################
@@ -34,7 +35,11 @@ include( TDEMacros )
34 35
 
35 36
 tde_setup_install_path( EXEC_INSTALL_PREFIX   "${CMAKE_INSTALL_PREFIX}" )
36 37
 tde_setup_install_path( BIN_INSTALL_DIR       "${EXEC_INSTALL_PREFIX}/bin"  )
37
-tde_setup_install_path( LIB_INSTALL_DIR       "${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX}" )
38
+if( CMAKE_INSTALL_LIBDIR )
39
+  tde_setup_install_path( LIB_INSTALL_DIR     "${EXEC_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}" )
40
+else( )
41
+  tde_setup_install_path( LIB_INSTALL_DIR     "${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX}" )
42
+endif( )
38 43
 tde_setup_install_path( INCLUDE_INSTALL_DIR   "${CMAKE_INSTALL_PREFIX}/include/tqt" )
39 44
 tde_setup_install_path( PKGCONFIG_INSTALL_DIR "${LIB_INSTALL_DIR}/pkgconfig" )
40 45
 

Loading…
Cancel
Save