source: CMakeModules/FindLibBluetooth.cmake@ 12754

Last change on this file since 12754 was 10700, checked in by Michael Tänzer, 12 years ago

Merge CMake branch into trunk

File size: 2.6 KB
Line 
1# - Find libbluetooth
2# Find the Bluez Linux Bluetooth library
3#
4# LIBBLUETOOTH_INCLUDE_DIR - where to find bluetooth.h etc.
5# LIBBLUETOOTH_LIBRARIES - List of libraries when using libbluetooth.
6# LIBBLUETOOTH_FOUND - True if libbluetooth was found.
7
8
9# [License]
10# The Ariba-Underlay Copyright
11#
12# Copyright (c) 2008-2012, Institute of Telematics, UniversitÀt Karlsruhe (TH)
13#
14# Institute of Telematics
15# UniversitÀt Karlsruhe (TH)
16# Zirkel 2, 76128 Karlsruhe
17# Germany
18#
19# Redistribution and use in source and binary forms, with or without
20# modification, are permitted provided that the following conditions are
21# met:
22#
23# 1. Redistributions of source code must retain the above copyright
24# notice, this list of conditions and the following disclaimer.
25# 2. Redistributions in binary form must reproduce the above copyright
26# notice, this list of conditions and the following disclaimer in the
27# documentation and/or other materials provided with the distribution.
28#
29# THIS SOFTWARE IS PROVIDED BY THE INSTITUTE OF TELEMATICS ``AS IS'' AND
30# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
31# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
32# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OF TELEMATICS OR
33# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
34# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
35# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
36# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
37# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
38# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
39# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
40#
41# The views and conclusions contained in the software and documentation
42# are those of the authors and should not be interpreted as representing
43# official policies, either expressed or implied, of the Institute of
44# Telematics.
45# [License]
46
47
48# Look for the header files.
49find_path(LIBBLUETOOTH_INCLUDE_DIR NAMES bluetooth/bluetooth.h)
50mark_as_advanced(LIBBLUETOOTH_INCLUDE_DIR)
51
52
53# Look for the library.
54find_library(LIBBLUETOOTH_LIBRARY NAMES bluetooth
55 DOC "The path to the Bluez Linux Bluetooth library"
56 )
57mark_as_advanced(LIBBLUETOOTH_LIBRARY)
58
59
60# handle the QUIETLY and REQUIRED arguments and set LIBBLUETOOTH_FOUND to TRUE
61# if all listed variables are TRUE
62find_package(PackageHandleStandardArgs)
63find_package_handle_standard_args(LibBluetooth DEFAULT_MSG
64 LIBBLUETOOTH_LIBRARY
65 LIBBLUETOOTH_INCLUDE_DIR
66 )
67
68if(LIBBLUETOOTH_FOUND)
69 set(LIBBLUETOOTH_LIBRARIES "${LIBBLUETOOTH_LIBRARY}")
70endif()
Note: See TracBrowser for help on using the repository browser.