added optional QT5 support - LedDevicePhilipsHue needs proper fixes

Former-commit-id: 7f0971ccda221933da4be836628532e7cfc7c085
This commit is contained in:
frostworx
2016-01-06 17:31:23 +01:00
parent d5529e86df
commit defe217c89
24 changed files with 210 additions and 9 deletions

View File

@@ -4,8 +4,12 @@ cmake_minimum_required(VERSION 2.8)
# Set the project name
project(hyperion-x11)
if(ENABLE_QT5)
find_package(Qt5Widgets REQUIRED)
else(ENABLE_QT5)
# find Qt4
find_package(Qt4 REQUIRED QtCore QtGui QtNetwork)
endif(ENABLE_QT5)
# Find X11
find_package(X11 REQUIRED)
@@ -28,7 +32,11 @@ set(Hyperion_X11_SOURCES
X11Wrapper.cpp
)
if(ENABLE_QT5)
QT5_WRAP_CPP(Hyperion_X11_HEADERS_MOC ${Hyperion_X11_QT_HEADERS})
else(ENABLE_QT5)
QT4_WRAP_CPP(Hyperion_X11_HEADERS_MOC ${Hyperion_X11_QT_HEADERS})
endif(ENABLE_QT5)
add_executable(hyperion-x11
${Hyperion_X11_HEADERS}
@@ -46,7 +54,11 @@ target_link_libraries(hyperion-x11
pthread
)
if(ENABLE_QT5)
qt5_use_modules(hyperion-x11 Widgets Core Gui Network)
else(ENABLE_QT5)
qt4_use_modules(hyperion-x11
Core
Gui
Network)
endif(ENABLE_QT5)