Implemented compile capability for MacOS.

Former-commit-id: 86e560e0d4f03251ee08a648ffa6fd9a0e01ae78
This commit is contained in:
Timo van der Zwan
2013-12-17 22:53:16 +01:00
parent 92bb518698
commit 6f15e89d29
12 changed files with 1256 additions and 55 deletions

View File

@@ -12,22 +12,14 @@ include_directories(
${LIBUSB_1_INCLUDE_DIRS}) # for Lightpack device
# Group the headers that go through the MOC compiler
SET(Leddevice_QT_HEADERS
${CURRENT_SOURCE_DIR}/LedDeviceAdalight.h
)
SET(Leddevice_HEADERS
${CURRENT_HEADER_DIR}/LedDevice.h
${CURRENT_HEADER_DIR}/LedDeviceFactory.h
${CURRENT_SOURCE_DIR}/LedSpiDevice.h
${CURRENT_SOURCE_DIR}/LedRs232Device.h
${CURRENT_SOURCE_DIR}/LedDeviceTest.h
${CURRENT_SOURCE_DIR}/LedDeviceSedu.h
${CURRENT_SOURCE_DIR}/LedDeviceWs2801.h
${CURRENT_SOURCE_DIR}/LedDeviceWs2811.h
${CURRENT_SOURCE_DIR}/LedDeviceLpd6803.h
${CURRENT_SOURCE_DIR}/LedDeviceLpd8806.h
${CURRENT_SOURCE_DIR}/LedDeviceLightpack.h
${CURRENT_SOURCE_DIR}/LedDevicePaintpack.h
${CURRENT_SOURCE_DIR}/LedDeviceMultiLightpack.h
@@ -36,20 +28,39 @@ SET(Leddevice_HEADERS
SET(Leddevice_SOURCES
${CURRENT_SOURCE_DIR}/LedDeviceFactory.cpp
${CURRENT_SOURCE_DIR}/LedSpiDevice.cpp
${CURRENT_SOURCE_DIR}/LedRs232Device.cpp
${CURRENT_SOURCE_DIR}/LedDeviceSedu.cpp
${CURRENT_SOURCE_DIR}/LedDeviceTest.cpp
${CURRENT_SOURCE_DIR}/LedDeviceWs2801.cpp
${CURRENT_SOURCE_DIR}/LedDeviceWs2811.cpp
${CURRENT_SOURCE_DIR}/LedDeviceLpd6803.cpp
${CURRENT_SOURCE_DIR}/LedDeviceLpd8806.cpp
${CURRENT_SOURCE_DIR}/LedDeviceAdalight.cpp
${CURRENT_SOURCE_DIR}/LedDeviceLightpack.cpp
${CURRENT_SOURCE_DIR}/LedDevicePaintpack.cpp
${CURRENT_SOURCE_DIR}/LedDeviceMultiLightpack.cpp
)
if(ENABLE_SPIDEV)
SET(Leddevice_QT_HEADERS
${Leddevice_QT_HEADERS}
${CURRENT_SOURCE_DIR}/LedDeviceAdalight.h
)
SET(Leddevice_HEADERS
${Leddevice_HEADERS}
${CURRENT_SOURCE_DIR}/LedSpiDevice.h
${CURRENT_SOURCE_DIR}/LedDeviceLpd6803.h
${CURRENT_SOURCE_DIR}/LedDeviceLpd8806.h
${CURRENT_SOURCE_DIR}/LedDeviceWs2801.h
${CURRENT_SOURCE_DIR}/LedDeviceWs2811.h
)
SET(Leddevice_SOURCES
${Leddevice_SOURCES}
${CURRENT_SOURCE_DIR}/LedSpiDevice.cpp
${CURRENT_SOURCE_DIR}/LedDeviceAdalight.cpp
${CURRENT_SOURCE_DIR}/LedDeviceLpd6803.cpp
${CURRENT_SOURCE_DIR}/LedDeviceLpd8806.cpp
${CURRENT_SOURCE_DIR}/LedDeviceWs2801.cpp
${CURRENT_SOURCE_DIR}/LedDeviceWs2811.cpp
)
endif(ENABLE_SPIDEV)
QT4_WRAP_CPP(Leddevice_HEADERS_MOC ${Leddevice_QT_HEADERS})
add_library(leddevice
@@ -61,9 +72,13 @@ add_library(leddevice
target_link_libraries(leddevice
hyperion-utils
hidapi-libusb
serialport
${LIBUSB_1_LIBRARIES} #apt-get install libusb-1.0-0-dev
${CMAKE_THREAD_LIBS_INIT}
${QT_LIBRARIES}
)
if(APPLE)
target_link_libraries(leddevice hidapi-mac)
else()
target_link_libraries(leddevice hidapi-libusb)
endif()