From bcf651d69c53a182cabf2af4a677f5bf10cd3f65 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Tue, 23 Jul 2024 22:51:06 +0900 Subject: Fix up location of library files and provide default values for CMAKE_ZLIBRARY_INSTALL_PREFIX Signed-off-by: Michele Calgaro --- CMakeLists.txt | 19 ++++++++++++++++++- debian/libzlcore-tqt-dev.install | 2 +- debian/libzlcore-tqt.install | 2 +- debian/libzltext-tqt-dev.install | 2 +- debian/libzltext-tqt.install | 2 +- 5 files changed, 22 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0e62764..3e63385 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,8 +41,25 @@ include( TDESetupPaths ) tde_setup_paths( ) +##### 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 ) + + ##### zlibrary-tqt paths +_tde_internal_setup_path( + CMAKE_ZLIBRARY_INSTALL_PREFIX "/usr" + "Base directory for zlibrary-tqt files" +) + _tde_internal_setup_path( ZL_SHARE_INSTALL_PREFIX "${CMAKE_ZLIBRARY_INSTALL_PREFIX}/share/zlibrary-tqt" "Base directory for zlibrary-tqt files which go to share" @@ -54,7 +71,7 @@ _tde_internal_setup_path( ) _tde_internal_setup_path( - ZL_LIB_INSTALL_DIR "${CMAKE_ZLIBRARY_INSTALL_PREFIX}/lib${LIB_SUFFIX}" + ZL_LIB_INSTALL_DIR "${CMAKE_ZLIBRARY_INSTALL_PREFIX}/${SYSTEM_LIBDIR}" "Base directory for zlibrary-tqt lib files" ) diff --git a/debian/libzlcore-tqt-dev.install b/debian/libzlcore-tqt-dev.install index 0c331fd..4b2f1a8 100644 --- a/debian/libzlcore-tqt-dev.install +++ b/debian/libzlcore-tqt-dev.install @@ -1,2 +1,2 @@ /usr/include/zlibrary-tqt/core -/usr/lib/libzlcore-tqt.so +/usr/lib/x86_64-linux-gnu/libzlcore-tqt.so diff --git a/debian/libzlcore-tqt.install b/debian/libzlcore-tqt.install index 059418a..f13e427 100644 --- a/debian/libzlcore-tqt.install +++ b/debian/libzlcore-tqt.install @@ -1 +1 @@ -/usr/lib/libzlcore-tqt.so.* +/usr/lib/x86_64-linux-gnu/libzlcore-tqt.so.* diff --git a/debian/libzltext-tqt-dev.install b/debian/libzltext-tqt-dev.install index 3ce02d3..eda8a3b 100644 --- a/debian/libzltext-tqt-dev.install +++ b/debian/libzltext-tqt-dev.install @@ -1,2 +1,2 @@ /usr/include/zlibrary-tqt/text -/usr/lib/libzltext-tqt.so +/usr/lib/x86_64-linux-gnu/libzltext-tqt.so diff --git a/debian/libzltext-tqt.install b/debian/libzltext-tqt.install index eeabb84..5d79675 100644 --- a/debian/libzltext-tqt.install +++ b/debian/libzltext-tqt.install @@ -1 +1 @@ -/usr/lib/libzltext-tqt.so.* +/usr/lib/x86_64-linux-gnu/libzltext-tqt.so.* -- cgit v1.2.1