summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2024-07-23 22:51:06 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2024-07-23 22:51:06 +0900
commitbcf651d69c53a182cabf2af4a677f5bf10cd3f65 (patch)
tree7a4af3ac8ce5e6fcee3b6ac5d5301ccbe60afb64
parent9feb16210d286da7ff1a4211d4586cdb3fcdad23 (diff)
downloadtde-ebook-reader-bcf651d69c53a182cabf2af4a677f5bf10cd3f65.tar.gz
tde-ebook-reader-bcf651d69c53a182cabf2af4a677f5bf10cd3f65.zip
Fix up location of library files and provide default values for CMAKE_ZLIBRARY_INSTALL_PREFIX
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
-rw-r--r--CMakeLists.txt19
-rw-r--r--debian/libzlcore-tqt-dev.install2
-rw-r--r--debian/libzlcore-tqt.install2
-rw-r--r--debian/libzltext-tqt-dev.install2
-rw-r--r--debian/libzltext-tqt.install2
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,9 +41,26 @@ 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.*