add some comments
[makneto-zunavac1.git] / CMakeMod / FindTelepathyQt4Farsight.cmake
blobc6e9c0215bd1bfd04064673b1e18c190c527bd36
1 # Try to find the Qt4 binding of the Telepathy Farsight library
2 # TELEPATHY_QT4_FARSIGHT_FOUND - system has TelepathyQt4Farsight
3 # TELEPATHY_QT4_FARSIGHT_INCLUDE_DIR - the TelepathyQt4Farsight include directory
4 # TELEPATHY_QT4_FARSIGHT_LIBRARIES - Link these to use TelepathyQt4Farsight
6 # Copyright (c) 2009, Andre Moreira Magalhaes <andrunko@gmail.com>
8 # Redistribution and use is allowed according to the terms of the BSD license.
9 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
11 set(TELEPATHY_QT4_FARSIGHT_FIND_REQUIRED ${TelepathyQt4Farsight_FIND_REQUIRED})
12 if(TELEPATHY_QT4_FARSIGHT_INCLUDE_DIR AND TELEPATHY_QT4_FARSIGHT_LIBRARIES)
13   # Already in cache, be silent
14   set(TELEPATHY_QT4_FARSIGHT_FIND_QUIETLY TRUE)
15 endif(TELEPATHY_QT4_FARSIGHT_INCLUDE_DIR AND TELEPATHY_QT4_FARSIGHT_LIBRARIES)
17 find_package(PkgConfig)
18 if(PKG_CONFIG_FOUND)
19     pkg_check_modules(PC_TELEPATHY_QT4_FARSIGHT QUIET TelepathyQt4Farsight>=0.1.8)
20 endif(PKG_CONFIG_FOUND)
22 find_path(TELEPATHY_QT4_FARSIGHT_INCLUDE_DIR
23           NAMES TelepathyQt4/Farsight/Channel
24           HINTS
25           ${PC_TELEPATHY_QT4_FARSIGHT_INCLUDEDIR}
26           ${PC_TELEPATHY_QT4_FARSIGHT_INCLUDE_DIRS}
29 find_library(TELEPATHY_QT4_FARSIGHT_LIBRARIES
30              NAMES telepathy-qt4-farsight
31              HINTS
32              ${PC_TELEPATHY_QT4_FARSIGHT_LIBDIR}
33              ${PC_TELEPATHY_QT4_FARSIGHT_LIBRARY_DIRS}
36 include(FindPackageHandleStandardArgs)
37 find_package_handle_standard_args(TELEPATHY_QT4_FARSIGHT DEFAULT_MSG
38                                   TELEPATHY_QT4_FARSIGHT_LIBRARIES TELEPATHY_QT4_FARSIGHT_INCLUDE_DIR)