render video in QML
[makneto-zunavac1.git] / CMakeMod / FindTpFarsight.cmake
blob2254f02190f0029dd1203a996a928896081b367c
1 # - Try to find telepathy-farsight
3 # Based on FindGStreamer.cmake
4 # Copyright (c) 2006, Tim Beaulen <tbscope@gmail.com>
5 # Copyright (c) 2009, George Kiagiadakis <kiagiadakis.george@gmail.com>
7 # Redistribution and use is allowed according to the terms of the BSD license.
8 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
10 IF (TPFARSIGHT_INCLUDE_DIR AND TPFARSIGHT_LIBRARIES)
11    # in cache already
12    SET(TpFarsight_FIND_QUIETLY TRUE)
13 ELSE (TPFARSIGHT_INCLUDE_DIR AND TPFARSIGHT_LIBRARIES)
14    SET(TpFarsight_FIND_QUIETLY FALSE)
15 ENDIF (TPFARSIGHT_INCLUDE_DIR AND TPFARSIGHT_LIBRARIES)
17 IF (NOT WIN32)
18    # use pkg-config to get the directories and then use these values
19    # in the FIND_PATH() and FIND_LIBRARY() calls
20    FIND_PACKAGE(PkgConfig)
21    PKG_CHECK_MODULES(PC_TPFARSIGHT QUIET telepathy-farsight>=0.0.4)
22    SET(TPFARSIGHT_DEFINITIONS ${PC_TPFARSIGHT_CFLAGS_OTHER})
23 ENDIF (NOT WIN32)
25 FIND_PATH(TPFARSIGHT_INCLUDE_DIR telepathy-farsight/channel.h
26    PATHS
27    ${PC_TPFARSIGHT_INCLUDEDIR}
28    ${PC_TPFARSIGHT_INCLUDE_DIRS}
29    )
30 FIND_LIBRARY(TPFARSIGHT_LIBRARIES NAMES telepathy-farsight
31    PATHS
32    ${PC_TPFARSIGHT_LIBDIR}
33    ${PC_TPFARSIGHT_LIBRARY_DIRS}
34    )
36 IF (NOT TPFARSIGHT_INCLUDE_DIR)
37    MESSAGE(STATUS "TpFarsight: WARNING: include dir not found")
38 ENDIF (NOT TPFARSIGHT_INCLUDE_DIR)
40 IF (NOT TPFARSIGHT_LIBRARIES)
41    MESSAGE(STATUS "TpFarsight: WARNING: library not found")
42 ENDIF (NOT TPFARSIGHT_LIBRARIES)
44 INCLUDE(FindPackageHandleStandardArgs)
45 FIND_PACKAGE_HANDLE_STANDARD_ARGS(TpFarsight  DEFAULT_MSG  TPFARSIGHT_LIBRARIES TPFARSIGHT_INCLUDE_DIR)
47 MARK_AS_ADVANCED(TPFARSIGHT_INCLUDE_DIR TPFARSIGHT_LIBRARIES)