diff options
author | Thiago Macieira <thiago@kde.org> | 2006-05-31 07:20:26 +0000 |
---|---|---|
committer | Thiago Macieira <thiago@kde.org> | 2006-05-31 07:20:26 +0000 |
commit | 3e8556ed033a9da40d2469c1f52bda8b54e59d74 (patch) | |
tree | f53d188b57dbac87ffebbbf5ba3e9243dc4aeb1d /modules/FindQtDBus.cmake | |
parent | c9c2901bc7e63c402c1e6cb7a154cfb175588c41 (diff) | |
download | extra-cmake-modules-3e8556ed033a9da40d2469c1f52bda8b54e59d74.tar.gz extra-cmake-modules-3e8556ed033a9da40d2469c1f52bda8b54e59d74.tar.bz2 |
Since no objections were raised in kde-core-devel, I am merging the
kdelibs4-dbus branch back into trunk. KDELibs compiles, links and
installs with this, but obviously all other modules will fail to
build. Let the porting commence.
CCMAIL:kde-core-devel@kde.org,kde-buildsystem@kde.org
svn path=/trunk/KDE/kdelibs/; revision=546826
Diffstat (limited to 'modules/FindQtDBus.cmake')
-rw-r--r-- | modules/FindQtDBus.cmake | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/modules/FindQtDBus.cmake b/modules/FindQtDBus.cmake new file mode 100644 index 00000000..396342c5 --- /dev/null +++ b/modules/FindQtDBus.cmake @@ -0,0 +1,36 @@ +# - Try to find the QtDBus module +# Once done this will define +# +# QDBUS_FOUND - system has QtDBus +# QDBUS_INCLUDE_DIR - the QtDBus include directory +# QDBUS_LIBRARIES - Link these to use QtDBus +# QDBUS_DEFINITIONS - Compiler switches required for using QtDBus +# + + +# use pkg-config to get the directories and then use these values +# in the FIND_PATH() and FIND_LIBRARY() calls +INCLUDE(UsePkgConfig) + +PKGCONFIG("dbus-1" _dbusIncDir _dbusLinkDir _dbusLinkFlags _dbusCflags) +PKGCONFIG("dbus-qt4-1" _qdbusIncDir _qdbusLinkDir _qdbusLinkFlags _qdbusCflags) + +set(QDBUS_DEFINITIONS ${_dbusCflags} ${_qdbusCflags}) +set(QDBUS_INCLUDE_DIRS ${_dbusIncDir} ${_qdbusIncDir}) + +FIND_LIBRARY(QDBUS_LIBRARIES NAMES dbus-qt4-1 + PATHS ${_qdbusLinkDir} +) + +if (QDBUS_INCLUDE_DIRS AND QDBUS_LIBRARIES) + set(QDBUS_FOUND TRUE) +endif (QDBUS_INCLUDE_DIRS AND QDBUS_LIBRARIES) + +message(STATUS "QtDBus Results: ${QDBUS_LIBRARIES} ${QDBUS_INCLUDE_DIRS} ${QDBUS_DEFINITIONS}") +if (QDBUS_FOUND) + if (NOT QDBUS_FIND_QUIETLY) + message(STATUS "Found QtDBus: ${QDBUS_LIBRARIES}") + endif (NOT QDBUS_FIND_QUIETLY) +else (QDBUS_FOUND) + message(FATAL_ERROR "Could NOT find QtDBus") +endif (QDBUS_FOUND) |