From 298cd5083af048a6d69224bfb2263185b870c003 Mon Sep 17 00:00:00 2001
From: Slávek Banko <slavek.banko@axis.cz>
Date: Wed, 25 Feb 2026 14:45:34 +0100
Subject: Use the default TDESetupPaths instead of custom settings.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This will ensure installation according to default multi-arch
location used by the distribution. See TDE/tde-cmake#140.

For INCLUDE_INSTALL_DIR, it is kept intact with the default
value, with the installation being targeted to a subfolder.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
---
 CMakeLists.txt     | 20 ++++++++++----------
 src/CMakeLists.txt |  5 +++--
 2 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index f09103c..a9adf6c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -28,9 +28,18 @@ include( FindPkgConfig )
 include( CheckCXXSourceCompiles )
 include( CheckSymbolExists )
 
+
+##### include our cmake modules #################
+
 include( TDEMacros )
 
 
+##### setup install paths #######################
+
+include( TDESetupPaths )
+tde_setup_paths( )
+
+
 ##### optional stuff
 
 option( WITH_ALL_OPTIONS "Enable all optional support" OFF )
@@ -42,19 +51,10 @@ option( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden"
 include( ConfigureChecks.cmake )
 
 
-##### install paths setup #######################
-
-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}" )
-tde_setup_install_path( INCLUDE_INSTALL_DIR   "${CMAKE_INSTALL_PREFIX}/include/${CMAKE_PROJECT_NAME}" )
-tde_setup_install_path( PKGCONFIG_INSTALL_DIR "${LIB_INSTALL_DIR}/pkgconfig" )
-
-
 ##### write pkgconfig file ######################
 
 string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" PC_EXEC_PREFIX ${EXEC_INSTALL_PREFIX} )
-string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" PC_INCLUDE_DIR ${INCLUDE_INSTALL_DIR} )
+string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" PC_INCLUDE_DIR ${INCLUDE_INSTALL_DIR}/${CMAKE_PROJECT_NAME} )
 string( REGEX REPLACE "^${CMAKE_INSTALL_PREFIX}" "\${prefix}" PC_LIB_DIR ${LIB_INSTALL_DIR} )
 configure_file( dbus-1-tqt.pc.cmake dbus-1-tqt.pc @ONLY )
 install( FILES ${CMAKE_CURRENT_BINARY_DIR}/dbus-1-tqt.pc DESTINATION ${PKGCONFIG_INSTALL_DIR} )
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index c09379a..19173f0 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -23,13 +23,14 @@ link_directories(
 
 ##### install headers ###########################
 
-install( FILES
+tde_process_includes(
     tqdbuserror.h tqdbusmessage.h tqdbusconnection.h
     tqdbusvariant.h tqdbusobject.h tqdbusproxy.h
     tqdbusmacros.h tqdbusdata.h tqdbusdatalist.h
     tqdbusdatamap.h tqdbusobjectpath.h tqdbusunixfd.h
     tqdbusdataconverter.h
-  DESTINATION ${INCLUDE_INSTALL_DIR} )
+  DESTINATION ${CMAKE_PROJECT_NAME}
+)
 
 
 ##### dbus-1-tqt (shared) #########################
-- 
cgit v1.2.3

