diff options
| author | Aurélien Gâteau <agateau@kde.org> | 2010-04-25 20:23:35 +0000 | 
|---|---|---|
| committer | Aurélien Gâteau <agateau@kde.org> | 2010-04-25 20:23:35 +0000 | 
| commit | 702294cdd23e33eb63552227421fdc786d118c64 (patch) | |
| tree | 128b6d522b4bd68c0b242d2e1e68dc29dfb240b5 | |
| parent | f0f0b3a934fd9c8e79eefeb86e10dfb9001e88bd (diff) | |
| download | extra-cmake-modules-702294cdd23e33eb63552227421fdc786d118c64.tar.gz extra-cmake-modules-702294cdd23e33eb63552227421fdc786d118c64.tar.bz2 | |
Added support for DBusMenu.
svn path=/trunk/KDE/kdelibs/; revision=1118756
| -rw-r--r-- | modules/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | modules/FindDBusMenuQt.cmake | 46 | 
2 files changed, 47 insertions, 0 deletions
| diff --git a/modules/CMakeLists.txt b/modules/CMakeLists.txt index 8dad8598..e7d8c38a 100644 --- a/modules/CMakeLists.txt +++ b/modules/CMakeLists.txt @@ -35,6 +35,7 @@ set(cmakeFiles CheckCXXSourceCompiles.cmake                 FindBlueZ.cmake                 FindBoost.cmake                 FindCarbon.cmake +               FindDBusMenuQt.cmake                 FindDNSSD.cmake                 FindENCHANT.cmake                 FindEigen.cmake diff --git a/modules/FindDBusMenuQt.cmake b/modules/FindDBusMenuQt.cmake new file mode 100644 index 00000000..fb95da1b --- /dev/null +++ b/modules/FindDBusMenuQt.cmake @@ -0,0 +1,46 @@ +# - Try to find dbusmenu-qt +# Once done this will define +# +#  DBUSMENUQT_FOUND - system has dbusmenu-qt +#  DBUSMENUQT_INCLUDE_DIR - the dbusmenu-qt include directory +#  DBUSMENUQT_LIBRARIES - the libraries needed to use dbusmenu-qt +#  DBUSMENUQT_DEFINITIONS - Compiler switches required for using dbusmenu-qt +# +# use pkg-config to get the directories and then use these values +# in the FIND_PATH() and FIND_LIBRARY() calls + +# Copyright (c) 2009, Canonical Ltd. +# - Author: Aurélien Gâteau <aurelien.gateau@canonical.com> +# +# Based on FindQCA2.cmake +# Copyright (c) 2006, Michael Larouche, <michael.larouche@kdemail.net> +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +include(FindPackageHandleStandardArgs) + +if (DBUSMENUQT_INCLUDE_DIR AND DBUSMENUQT_LIBRARIES) +    # in cache already +    set(DBUSMENUQT_FOUND TRUE) +else (DBUSMENUQT_INCLUDE_DIR AND DBUSMENUQT_LIBRARIES) +    if (NOT WIN32) +        find_package(PkgConfig) +        pkg_check_modules(PC_DBUSMENUQT QUIET dbusmenu-qt) +        set(DBUSMENUQT_DEFINITIONS ${PC_DBUSMENUQT_CFLAGS_OTHER}) +    endif (NOT WIN32) + +    find_library(DBUSMENUQT_LIBRARIES +        NAMES dbusmenu-qt +        HINTS ${PC_DBUSMENUQT_LIBDIR} ${PC_DBUSMENUQT_LIBRARY_DIRS} +        ) + +    find_path(DBUSMENUQT_INCLUDE_DIR dbusmenuexporter.h +        HINTS ${PC_DBUSMENUQT_INCLUDEDIR} ${PC_DBUSMENUQT_INCLUDE_DIRS} +        PATH_SUFFIXES dbusmenu-qt +        ) + +    find_package_handle_standard_args(dbusmenu-qt DEFAULT_MSG DBUSMENUQT_LIBRARIES DBUSMENUQT_INCLUDE_DIR) + +    mark_as_advanced(DBUSMENUQT_INCLUDE_DIR DBUSMENUQT_LIBRARIES) +endif (DBUSMENUQT_INCLUDE_DIR AND DBUSMENUQT_LIBRARIES) | 
