cmake: add check for tinyb and set as dependency for 2jciebu01-ble

Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
Mihai Tudor Panu 2019-04-09 20:20:24 -07:00
parent 223b6028bf
commit 9cddd4a8b1
2 changed files with 13 additions and 5 deletions

View File

@ -150,6 +150,9 @@ pkg_check_modules (MODBUS libmodbus>=3.1.2)
# Check for OPENZWAVE
pkg_check_modules (OPENZWAVE libopenzwave)
# Check for TinyB
pkg_check_modules (TINYB tinyb>=0.5.1)
# Find JPEG
find_package (JPEG)

View File

@ -1,5 +1,10 @@
if (TINYB_FOUND)
set (libname "2jciebu01-ble")
set (libdescription "Omron BLE Environment Sensor")
set (module_src "2jciebu01_ble.cxx")
set (module_hpp "2jciebu01_ble.hpp")
upm_module_init(2jciebu01-usb)
set (reqlibname "libtinyb")
upm_module_init(2jciebu01-usb ${TINYB_LIBRARIES})
target_include_directories(${libname} PUBLIC ${TINYB_INCLUDE_DIRS})
endif()