Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cmake] Add support for Bluetooth #11137

Merged
merged 1 commit into from Dec 12, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion project/cmake/CMakeLists.txt
Expand Up @@ -119,7 +119,7 @@ endif()
# Optional dependencies
set(optional_deps MicroHttpd MySqlClient SSH XSLT
Alsa UDEV DBus Avahi SmbClient
PulseAudio VDPAU VAAPI)
PulseAudio VDPAU VAAPI Bluetooth)

# Required, dyloaded deps
set(required_dyload Curl ASS)
Expand Down
6 changes: 3 additions & 3 deletions project/cmake/modules/FindBluetooth.cmake
Expand Up @@ -14,20 +14,20 @@
# Bluetooth::Bluetooth - The Bluetooth library

if(PKG_CONFIG_FOUND)
pkg_check_modules(PC_BLUETOOTH bluetooth QUIET)
pkg_check_modules(PC_BLUETOOTH bluez bluetooth QUIET)
endif()

find_path(BLUETOOTH_INCLUDE_DIR NAMES bluetooth/bluetooth.h
PATHS ${PC_BLUETOOTH_INCLUDEDIR})
find_library(BLUETOOTH_LIBRARY NAMES bluetooth
find_library(BLUETOOTH_LIBRARY NAMES bluetooth libbluetooth
PATHS ${PC_BLUETOOTH_LIBDIR})

set(BLUETOOTH_VERSION ${PC_BLUETOOTH_VERSION})

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Bluetooth
REQUIRED_VARS BLUETOOTH_LIBRARY BLUETOOTH_INCLUDE_DIR
VERSION_VAR ${BLUETOOTH_VERSION})
VERSION_VAR BLUETOOTH_VERSION)

if(BLUETOOTH_FOUND)
set(BLUETOOTH_INCLUDE_DIRS ${BLUETOOTH_INCLUDE_DIR})
Expand Down
3 changes: 3 additions & 0 deletions xbmc/network/CMakeLists.txt
Expand Up @@ -45,3 +45,6 @@ if(SHAIRPLAY_FOUND)
endif()

core_add_library(network)
if(BLUETOOTH_FOUND)
target_compile_definitions(${CORE_LIBRARY} PRIVATE -DHAVE_LIBBLUETOOTH=1)
endif()