diff --git a/CMakeLists.txt b/CMakeLists.txt index a6615a16..c1a90dac 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/src/2jciebu01-ble/CMakeLists.txt b/src/2jciebu01-ble/CMakeLists.txt index a07f57d3..5a746256 100644 --- a/src/2jciebu01-ble/CMakeLists.txt +++ b/src/2jciebu01-ble/CMakeLists.txt @@ -1,5 +1,10 @@ -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) +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") + + set (reqlibname "libtinyb") + upm_module_init(2jciebu01-usb ${TINYB_LIBRARIES}) + target_include_directories(${libname} PUBLIC ${TINYB_INCLUDE_DIRS}) +endif() \ No newline at end of file