File: FindLibBlueDevil.cmake

package info (click to toggle)
bluedevil 1.0~rc3-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 1,040 kB
  • ctags: 670
  • sloc: cpp: 5,654; xml: 424; makefile: 11; sh: 2
file content (38 lines) | stat: -rw-r--r-- 1,560 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Find LibBlueDevil includes and library
#
# This module defines
#  LibBlueDevil_INCLUDE_DIR
#  LibBlueDevil_LIBRARIES, the libraries to link against to use LibBlueDevil.
#  LibBlueDevil_FOUND, If false, do not try to use LibBlueDevil
#
# Copyright 2010, Aleix Pol Gonzalez
#
# Redistribution and use is allowed according to the terms of the BSD license.

IF (LibBlueDevil_LIBRARIES AND LibBlueDevil_INCLUDE_DIR)
    SET(LibBlueDevil_FIND_QUIETLY TRUE) # Already in cache, be silent
ENDIF (LibBlueDevil_LIBRARIES AND LibBlueDevil_INCLUDE_DIR)

MESSAGE(STATUS "Looking for LibBlueDevil")
# find_path(LibBlueDevil_INCLUDE_DIR bluedevilmanager.h PATH_SUFFIXES bluedevil)
find_path(LibBlueDevil_INCLUDE_DIR bluedevil/bluedevilmanager.h) #apol's NOTE: the one above looks better but doesn't fit the way you work
find_library(LibBlueDevil_LIBRARIES bluedevil)

MARK_AS_ADVANCED(LibBlueDevil_INCLUDE_DIR)
MARK_AS_ADVANCED(LibBlueDevil_LIBRARIES)

IF (LibBlueDevil_INCLUDE_DIR AND LibBlueDevil_LIBRARIES)
    SET(LibBlueDevil_FOUND TRUE)
ENDIF (LibBlueDevil_INCLUDE_DIR AND LibBlueDevil_LIBRARIES)

IF (LibBlueDevil_FOUND)
   IF (NOT LibBlueDevil_FIND_QUIETLY)
        MESSAGE(STATUS "Found LibBlueDevil")
        MESSAGE(STATUS "  libraries : ${LibBlueDevil_LIBRARIES}")
        MESSAGE(STATUS "  includes  : ${LibBlueDevil_INCLUDE_DIR}")
   ENDIF (NOT LibBlueDevil_FIND_QUIETLY)
ELSE (LibBlueDevil_FOUND)
    IF (LibBlueDevil_FIND_REQUIRED)
        MESSAGE(FATAL_ERROR "Could not find LibBlueDevil")
    ENDIF (LibBlueDevil_FIND_REQUIRED)
ENDIF (LibBlueDevil_FOUND)