add some comments
[makneto-zunavac1.git] / CMakeMod / FindTelepathyQt4.cmake
blobb4d486863d1b17ddc3152a6064e1a92f6e153d3e
1 # Try to find the Qt4 binding of the Telepathy library
2 # TELEPATHY_QT4_FOUND - system has TelepathyQt4
3 # TELEPATHY_QT4_INCLUDE_DIR - the TelepathyQt4 include directory
4 # TELEPATHY_QT4_LIBRARIES - Link these to use TelepathyQt4
6 # Copyright (c) 2008, Allen Winter <winter@kde.org>
7 # Copyright (c) 2009, Andre Moreira Magalhaes <andrunko@gmail.com>
9 # Redistribution and use is allowed according to the terms of the BSD license.
10 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
12 set(TELEPATHY_QT4_FIND_REQUIRED ${TelepathyQt4_FIND_REQUIRED})
13 if(TELEPATHY_QT4_INCLUDE_DIR AND TELEPATHY_QT4_LIBRARIES)
14   # Already in cache, be silent
15   set(TELEPATHY_QT4_FIND_QUIETLY TRUE)
16 endif(TELEPATHY_QT4_INCLUDE_DIR AND TELEPATHY_QT4_LIBRARIES)
18 find_package(PkgConfig)
19 if(PKG_CONFIG_FOUND)
20     pkg_check_modules(PC_TELEPATHY_QT4 QUIET TelepathyQt4>=0.1.9)
21 endif(PKG_CONFIG_FOUND)
23 find_path(TELEPATHY_QT4_INCLUDE_DIR
24           NAMES TelepathyQt4/Types
25           HINTS
26           ${PC_TELEPATHY_QT4_INCLUDEDIR}
27           ${PC_TELEPATHY_QT4_INCLUDE_DIRS}
30 find_library(TELEPATHY_QT4_LIBRARIES
31              NAMES telepathy-qt4
32              HINTS
33              ${PC_TELEPATHY_QT4_LIBDIR}
34              ${PC_TELEPATHY_QT4_LIBRARY_DIRS}
37 include(FindPackageHandleStandardArgs)
38 find_package_handle_standard_args(TELEPATHY_QT4 DEFAULT_MSG
39                                   TELEPATHY_QT4_LIBRARIES TELEPATHY_QT4_INCLUDE_DIR)