summaryrefslogtreecommitdiffstats
path: root/project/cmake/modules/FindBluetooth.cmake
diff options
context:
space:
mode:
authormanuel <manuel@mausz.at>2017-06-04 16:57:49 +0200
committermanuel <manuel@mausz.at>2017-06-04 16:57:49 +0200
commitf44ecaa4f27e7538ddcad66d40e543bffa2d2d86 (patch)
treed8de60fc7e17edeb6f0921726c038ee54b281445 /project/cmake/modules/FindBluetooth.cmake
parentae08c8b7221bc965ac40d70e53fc8fcddb050c46 (diff)
downloadkodi-pvr-build-f44ecaa4f27e7538ddcad66d40e543bffa2d2d86.tar.gz
kodi-pvr-build-f44ecaa4f27e7538ddcad66d40e543bffa2d2d86.tar.bz2
kodi-pvr-build-f44ecaa4f27e7538ddcad66d40e543bffa2d2d86.zip
sync with upstream
Diffstat (limited to 'project/cmake/modules/FindBluetooth.cmake')
-rw-r--r--project/cmake/modules/FindBluetooth.cmake44
1 files changed, 0 insertions, 44 deletions
diff --git a/project/cmake/modules/FindBluetooth.cmake b/project/cmake/modules/FindBluetooth.cmake
deleted file mode 100644
index a69980d..0000000
--- a/project/cmake/modules/FindBluetooth.cmake
+++ /dev/null
@@ -1,44 +0,0 @@
1#.rst:
2# FindBluetooth
3# ---------
4# Finds the Bluetooth library
5#
6# This will will define the following variables::
7#
8# BLUETOOTH_FOUND - system has Bluetooth
9# BLUETOOTH_INCLUDE_DIRS - the Bluetooth include directory
10# BLUETOOTH_LIBRARIES - the Bluetooth libraries
11#
12# and the following imported targets::
13#
14# Bluetooth::Bluetooth - The Bluetooth library
15
16if(PKG_CONFIG_FOUND)
17 pkg_check_modules(PC_BLUETOOTH bluez bluetooth QUIET)
18endif()
19
20find_path(BLUETOOTH_INCLUDE_DIR NAMES bluetooth/bluetooth.h
21 PATHS ${PC_BLUETOOTH_INCLUDEDIR})
22find_library(BLUETOOTH_LIBRARY NAMES bluetooth libbluetooth
23 PATHS ${PC_BLUETOOTH_LIBDIR})
24
25set(BLUETOOTH_VERSION ${PC_BLUETOOTH_VERSION})
26
27include(FindPackageHandleStandardArgs)
28find_package_handle_standard_args(Bluetooth
29 REQUIRED_VARS BLUETOOTH_LIBRARY BLUETOOTH_INCLUDE_DIR
30 VERSION_VAR BLUETOOTH_VERSION)
31
32if(BLUETOOTH_FOUND)
33 set(BLUETOOTH_INCLUDE_DIRS ${BLUETOOTH_INCLUDE_DIR})
34 set(BLUETOOTH_LIBRARIES ${BLUETOOTH_LIBRARY})
35
36 if(NOT TARGET Bluetooth::Bluetooth)
37 add_library(Bluetooth::Bluetooth UNKNOWN IMPORTED)
38 set_target_properties(Bluetooth::Bluetooth PROPERTIES
39 IMPORTED_LOCATION "${BLUETOOTH_LIBRARY}"
40 INTERFACE_INCLUDE_DIRECTORIES "${BLUETOOTH_INCLUDE_DIR}")
41 endif()
42endif()
43
44mark_as_advanced(BLUETOOTH_INCLUDE_DIR BLUETOOTH_LIBRARY)