mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-29 01:48:31 +00:00
a/os: Refactor out BLE functions into own library
This commit is contained in:
parent
96eabd1347
commit
637c49c1ea
|
@ -1,20 +1,24 @@
|
|||
# Copyright 2019-2022, Collabora, Ltd.
|
||||
# SPDX-License-Identifier: BSL-1.0
|
||||
|
||||
add_library(
|
||||
aux_os STATIC
|
||||
os_ble.h
|
||||
os_documentation.h
|
||||
os_hid.h
|
||||
os_hid_hidraw.c
|
||||
os_threading.h
|
||||
)
|
||||
####
|
||||
# Main os library
|
||||
#
|
||||
|
||||
add_library(aux_os STATIC os_documentation.h os_hid.h os_hid_hidraw.c os_threading.h)
|
||||
target_link_libraries(aux_os PUBLIC aux-includes xrt-pthreads)
|
||||
|
||||
####
|
||||
# BLE library
|
||||
#
|
||||
|
||||
add_library(aux_os_ble STATIC os_ble.h)
|
||||
target_link_libraries(aux_os_ble PUBLIC aux-includes aux_os)
|
||||
|
||||
if(XRT_HAVE_DBUS)
|
||||
target_sources(aux_os PRIVATE os_ble_dbus.c)
|
||||
target_link_libraries(aux_os PRIVATE ${DBUS_LIBRARIES})
|
||||
target_include_directories(aux_os SYSTEM PRIVATE ${DBUS_INCLUDE_DIRS})
|
||||
target_sources(aux_os_ble PRIVATE os_ble_dbus.c)
|
||||
target_link_libraries(aux_os_ble PRIVATE ${DBUS_LIBRARIES})
|
||||
target_include_directories(aux_os_ble SYSTEM PRIVATE ${DBUS_INCLUDE_DIRS})
|
||||
else()
|
||||
target_sources(aux_os PRIVATE os_ble_stubs.c)
|
||||
target_sources(aux_os_ble PRIVATE os_ble_stubs.c)
|
||||
endif()
|
||||
|
|
|
@ -13,7 +13,7 @@ if(XRT_BUILD_DRIVER_ARDUINO)
|
|||
drv_arduino STATIC arduino/arduino_device.c arduino/arduino_interface.h
|
||||
arduino/arduino_prober.c
|
||||
)
|
||||
target_link_libraries(drv_arduino PRIVATE xrt-interfaces aux_util aux_os)
|
||||
target_link_libraries(drv_arduino PRIVATE xrt-interfaces aux_util aux_os aux_os_ble)
|
||||
list(APPEND ENABLED_DRIVERS arduino)
|
||||
endif()
|
||||
|
||||
|
@ -26,7 +26,7 @@ if(XRT_BUILD_DRIVER_DAYDREAM)
|
|||
drv_daydream STATIC daydream/daydream_device.c daydream/daydream_device.h
|
||||
daydream/daydream_interface.h daydream/daydream_prober.c
|
||||
)
|
||||
target_link_libraries(drv_daydream PRIVATE xrt-interfaces aux_util aux_os)
|
||||
target_link_libraries(drv_daydream PRIVATE xrt-interfaces aux_util aux_os aux_os_ble)
|
||||
list(APPEND ENABLED_DRIVERS daydream)
|
||||
endif()
|
||||
|
||||
|
|
Loading…
Reference in a new issue