trinity-devel@lists.pearsoncomputing.net

Message: previous - next
Month: July 2011

Re: [trinity-devel] [PATCH] kdebase: use pkgconfig to find dbus-tqt

From: Nix <nix@...>
Date: Tue, 19 Jul 2011 15:10:26 +0100
On 19 Jul 2011, nix@... told this:

> This looks for dbus-tqt using pkg-config, rather than explicitly
> hardwiring it (though the compilation test is retained).
> 
> This fixes the case where dbus-tqt is installed using a different prefix
> from Qt or dbus itself. This is fairly common these days (I have kde3
> installed in /usr/kde3, but Qt3 is installed in /usr, because non-KDE3
> programs need it.)
>
> It requires my previous dbus-tqt pkgconfig patch.

Sorry, this was incomplete: of course we have to use the flags
as well.

Index: ConfigureChecks.cmake
===================================================================
--- ConfigureChecks.cmake	(revision 1242239)
+++ ConfigureChecks.cmake	(working copy)
@@ -189,9 +189,10 @@
   endif( )
 
   # check for dbus-tqt
+  pkg_check_modules( DBUS_TQT REQUIRED dbus-tqt )
   tde_save( CMAKE_REQUIRED_INCLUDES CMAKE_REQUIRED_LIBRARIES )
-  set( CMAKE_REQUIRED_INCLUDES ${QT_INCLUDE_DIRS} ${TQT_INCLUDE_DIRS} ${DBUS_INCLUDE_DIRS} )
-  set( CMAKE_REQUIRED_LIBRARIES ${TQT_LDFLAGS} )
+  set( CMAKE_REQUIRED_INCLUDES ${DBUS_TQT_INCLUDE_DIRS} ${TQT_INCLUDE_DIRS} ${QT_INCLUDE_DIRS})
+  set( CMAKE_REQUIRED_LIBRARIES ${DBUS_TQT_LDFLAGS} ${TQT_LDFLAGS} ${QT_LDFLAGS} )
   check_cxx_source_compiles("
     #include <tqt.h>
     #include <dbus/connection.h>
Index: ksmserver/CMakeLists.txt
===================================================================
--- ksmserver/CMakeLists.txt	(revision 1242239)
+++ ksmserver/CMakeLists.txt	(working copy)
@@ -19,12 +19,13 @@
   ${CMAKE_SOURCE_DIR}/kdmlib
   ${TDE_INCLUDE_DIR}
   ${TQT_INCLUDE_DIRS}
-  ${DBUS_INCLUDE_DIRS}
+  ${DBUS_TQT_INCLUDE_DIRS}
   ${HAL_INCLUDE_DIRS}
 )
 
 link_directories(
   ${TQT_LIBRARY_DIRS}
+  ${DBUS_TQT_LIBRARY_DIRS}
 )
 
 
@@ -42,5 +43,5 @@
     main.cpp server.cpp shutdowndlg.cpp
     legacy.cpp startup.cpp shutdown.cpp client.cpp
     KSMServerInterface.skel server.skel timed.ui
-  LINK dmctl-static kdeui-shared ${HAL_LIBRARIES} ${DBUS_LIBRARIES}
+  LINK dmctl-static kdeui-shared ${HAL_LIBRARIES} ${DBUS_TQT_LIBRARIES}
 )
Index: kdm/backend/CMakeLists.txt
===================================================================
--- kdm/backend/CMakeLists.txt	(revision 1242239)
+++ kdm/backend/CMakeLists.txt	(working copy)
@@ -14,9 +14,12 @@
 include_directories(
   ${CMAKE_CURRENT_BINARY_DIR}
   ${CMAKE_BINARY_DIR}
-  ${DBUS_INCLUDE_DIRS}
+  ${DBUS_TQT_INCLUDE_DIRS}
 )
 
+link_directories(
+  ${DBUS_TQT_LIBRARY_DIRS}
+)
 
 ##### kdm (executable) ##########################
 
@@ -34,6 +37,6 @@
     process.c protodpy.c reset.c resource.c rpcauth.c
     server.c session.c sessreg.c socket.c streams.c
     util.c xdmauth.c xdmcp.c
-  LINK X11 ${XAU_LIBRARIES} ${DBUS_LIBRARIES} ${PAM_LIBRARY}
+  LINK X11 ${XAU_LIBRARIES} ${DBUS_TQT_LIBRARIES} ${PAM_LIBRARY}
   DESTINATION ${BIN_INSTALL_DIR}
 )

-- 
NULL && (void)