Initial commit
[drdanz-telepathy-kde:libktelepathy-tests.git] / cmake / modules / FindKTelepathy.cmake
1 # Try to find the KTelepathy library
2 # KTELEPATHY_FOUND - system has libkcmtelepathyaccounts
3 # KTELEPATHY_INCLUDE_DIR - the kcmtelepathyaccounts include directory
4 # KTELEPATHY_LIBRARIES - Link these to use libkcmtelepathyaccounts
5
6 # Copyright (c) 2008, Allen Winter <winter@kde.org>
7 # Copyright (c) 2010, Daniele E. Domenichelli <daniele.domenichelli@gmail.com>
8 #
9 # Redistribution and use is allowed according to the terms of the BSD license.
10 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
11
12 SET (KTELEPATHY_FIND_REQUIRED ${KTelepathy_FIND_REQUIRED})
13 if (KTELEPATHY_INCLUDE_DIR AND KTELEPATHY_LIBRARIES)
14   # Already in cache, be silent
15   set(KTELEPATHY_FIND_QUIETLY TRUE)
16 endif (KTELEPATHY_INCLUDE_DIR AND KTELEPATHY_LIBRARIES)
17
18 find_path(KTELEPATHY_INCLUDE_DIR
19   NAMES KTelepathy/AbstractTreeItem KTelepathy/abstract-tree-item.h)
20 find_library(KTELEPATHY_LIBRARIES NAMES ktelepathy )
21
22 include(FindPackageHandleStandardArgs)
23 FIND_PACKAGE_HANDLE_STANDARD_ARGS(KTELEPATHY DEFAULT_MSG
24                                   KTELEPATHY_LIBRARIES KTELEPATHY_INCLUDE_DIR)
25
26
27 mark_as_advanced(KTELEPATHY_INCLUDE_DIR KTELEPATHY_LIBRARIES)