mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
add support for tinkerforge
Former-commit-id: 8dbd3d915f70ace8d1b27602f0d76a2a546ac043
This commit is contained in:
@@ -6,10 +6,20 @@ SET(CURRENT_SOURCE_DIR ${CMAKE_SOURCE_DIR}/libsrc/leddevice)
|
||||
#add libusb and pthreads (required for the Lighpack usb device)
|
||||
find_package(libusb-1.0 REQUIRED)
|
||||
find_package(Threads REQUIRED)
|
||||
if(ENABLE_TINKERFORGE)
|
||||
find_package(libtinkerforge-1.0 REQUIRED)
|
||||
endif(ENABLE_TINKERFORGE)
|
||||
|
||||
|
||||
include_directories(
|
||||
../../include/hidapi
|
||||
${LIBUSB_1_INCLUDE_DIRS}) # for Lightpack device
|
||||
../../include/hidapi
|
||||
${LIBUSB_1_INCLUDE_DIRS}) # for Lightpack device
|
||||
|
||||
|
||||
if(ENABLE_TINKERFORGE)
|
||||
include_directories(
|
||||
${LIBTINKERFORGE_1_INCLUDE_DIRS}) # for Tinkerforge device
|
||||
endif(ENABLE_TINKERFORGE)
|
||||
|
||||
# Group the headers that go through the MOC compiler
|
||||
SET(Leddevice_QT_HEADERS
|
||||
@@ -67,6 +77,17 @@ if(ENABLE_SPIDEV)
|
||||
)
|
||||
endif(ENABLE_SPIDEV)
|
||||
|
||||
if(ENABLE_TINKERFORGE)
|
||||
SET(Leddevice_HEADERS
|
||||
${Leddevice_HEADERS}
|
||||
${CURRENT_SOURCE_DIR}/LedDeviceTinkerforge.h
|
||||
)
|
||||
SET(Leddevice_SOURCES
|
||||
${Leddevice_SOURCES}
|
||||
${CURRENT_SOURCE_DIR}/LedDeviceTinkerforge.cpp
|
||||
)
|
||||
endif(ENABLE_TINKERFORGE)
|
||||
|
||||
|
||||
QT4_WRAP_CPP(Leddevice_HEADERS_MOC ${Leddevice_QT_HEADERS})
|
||||
|
||||
@@ -78,12 +99,19 @@ add_library(leddevice
|
||||
)
|
||||
|
||||
target_link_libraries(leddevice
|
||||
hyperion-utils
|
||||
serialport
|
||||
${LIBUSB_1_LIBRARIES} #apt-get install libusb-1.0-0-dev
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
${QT_LIBRARIES}
|
||||
hyperion-utils
|
||||
serialport
|
||||
${LIBUSB_1_LIBRARIES} #apt-get install libusb-1.0-0-dev
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
${QT_LIBRARIES}
|
||||
)
|
||||
|
||||
if(ENABLE_TINKERFORGE)
|
||||
target_link_libraries(leddevice
|
||||
${LIBTINKERFORGE_1_LIBRARIES}
|
||||
)
|
||||
endif()
|
||||
|
||||
if(APPLE)
|
||||
target_link_libraries(leddevice hidapi-mac)
|
||||
else()
|
||||
|
Reference in New Issue
Block a user