mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
added optional QT5 support - LedDevicePhilipsHue needs proper fixes
Former-commit-id: 7f0971ccda221933da4be836628532e7cfc7c085
This commit is contained in:
@@ -23,7 +23,11 @@ set(Hyperion_AML_SOURCES
|
||||
hyperion-aml.cpp
|
||||
)
|
||||
|
||||
if(ENABLE_QT5)
|
||||
QT5_WRAP_CPP(Hyperion_AML_HEADERS_MOC ${Hyperion_AML_QT_HEADERS})
|
||||
else(ENABLE_QT5)
|
||||
QT4_WRAP_CPP(Hyperion_AML_HEADERS_MOC ${Hyperion_AML_QT_HEADERS})
|
||||
endif(ENABLE_QT5)
|
||||
|
||||
add_executable(hyperion-amlogic
|
||||
${Hyperion_AML_HEADERS}
|
||||
|
@@ -3,7 +3,13 @@ cmake_minimum_required(VERSION 2.8)
|
||||
project(hyperion-remote)
|
||||
|
||||
# find Qt4
|
||||
if(ENABLE_QT5)
|
||||
find_package(Qt5 COMPONENTS Core Gui Widgets Network REQUIRED)
|
||||
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")
|
||||
# set(CMAKE_CXX_FLAGS "-fPIC")
|
||||
else(ENABLE_QT5)
|
||||
find_package(Qt4 REQUIRED QtCore QtGui QtNetwork)
|
||||
endif(ENABLE_QT5)
|
||||
|
||||
# The following I do not undrstand completely...
|
||||
# libQtCore.so uses some hardcoded library path inside which are incorrect after copying the file RPi file system
|
||||
@@ -25,6 +31,10 @@ add_executable(hyperion-remote
|
||||
${hyperion-remote_HEADERS}
|
||||
${hyperion-remote_SOURCES})
|
||||
|
||||
if(ENABLE_QT5)
|
||||
qt5_use_modules(hyperion-remote Widgets Network)
|
||||
endif(ENABLE_QT5)
|
||||
|
||||
target_link_libraries(hyperion-remote
|
||||
jsoncpp
|
||||
getoptPlusPlus
|
||||
|
@@ -43,8 +43,13 @@ int main(int argc, char * argv[])
|
||||
// create the option parser and initialize all parameters
|
||||
OptionsParser optionParser("Simple application to send a command to hyperion using the Json interface");
|
||||
ParameterSet & parameters = optionParser.getParameters();
|
||||
#ifdef ENABLE_QT5
|
||||
StringParameter & argAddress = parameters.add<StringParameter> ('a', "address" , QString("Set the address of the hyperion server [default: %1]").arg(defaultServerAddress).toLatin1().constData());
|
||||
IntParameter & argPriority = parameters.add<IntParameter> ('p', "priority" , QString("Use to the provided priority channel (the lower the number, the higher the priority) [default: %1]").arg(defaultPriority).toLatin1().constData());
|
||||
#else
|
||||
StringParameter & argAddress = parameters.add<StringParameter> ('a', "address" , QString("Set the address of the hyperion server [default: %1]").arg(defaultServerAddress).toAscii().constData());
|
||||
IntParameter & argPriority = parameters.add<IntParameter> ('p', "priority" , QString("Use to the provided priority channel (the lower the number, the higher the priority) [default: %1]").arg(defaultPriority).toAscii().constData());
|
||||
#endif
|
||||
IntParameter & argDuration = parameters.add<IntParameter> ('d', "duration" , "Specify how long the leds should be switched on in millseconds [default: infinity]");
|
||||
ColorParameter & argColor = parameters.add<ColorParameter> ('c', "color" , "Set all leds to a constant color (either RRGGBB hex value or a color name. The color may be repeated multiple time like: RRGGBBRRGGBB)");
|
||||
ImageParameter & argImage = parameters.add<ImageParameter> ('i', "image" , "Set the leds to the colors according to the given image file");
|
||||
|
@@ -3,7 +3,14 @@ cmake_minimum_required(VERSION 2.8)
|
||||
project(hyperion-v4l2)
|
||||
|
||||
# find Qt4
|
||||
if(ENABLE_QT5)
|
||||
find_package(Qt5Widgets REQUIRED)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")
|
||||
# set(CMAKE_CXX_FLAGS "-fPIC")
|
||||
else(ENABLE_QT5)
|
||||
find_package(Qt4 REQUIRED QtCore QtGui QtNetwork)
|
||||
endif(ENABLE_QT5)
|
||||
|
||||
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../../libsrc/protoserver
|
||||
@@ -24,8 +31,11 @@ set(Hyperion_V4L2_SOURCES
|
||||
hyperion-v4l2.cpp
|
||||
ScreenshotHandler.cpp
|
||||
)
|
||||
|
||||
if(ENABLE_QT5)
|
||||
QT5_WRAP_CPP(Hyperion_V4L2_MOC_SOURCES ${Hyperion_V4L2_QT_HEADERS})
|
||||
else(ENABLE_QT5)
|
||||
QT4_WRAP_CPP(Hyperion_V4L2_MOC_SOURCES ${Hyperion_V4L2_QT_HEADERS})
|
||||
endif(ENABLE_QT5)
|
||||
|
||||
add_executable(hyperion-v4l2
|
||||
${Hyperion_V4L2_HEADERS}
|
||||
|
@@ -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)
|
||||
|
Reference in New Issue
Block a user