From 73d4ee882197f1af6dd5e8c54c196017d7539bbb Mon Sep 17 00:00:00 2001 From: Raphael Dumusc Date: Tue, 30 Aug 2016 14:59:49 +0200 Subject: [PATCH] DesktopStreamer: Added DEFLECT_DESKTOPSTREAMER_HOSTS CMake option --- apps/DesktopStreamer/CMakeLists.txt | 12 ++++++++++++ apps/DesktopStreamer/MainWindow.cpp | 7 +------ doc/Changelog.md | 3 +++ 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/apps/DesktopStreamer/CMakeLists.txt b/apps/DesktopStreamer/CMakeLists.txt index 74c2347..c29d3e9 100644 --- a/apps/DesktopStreamer/CMakeLists.txt +++ b/apps/DesktopStreamer/CMakeLists.txt @@ -22,6 +22,18 @@ set(DESKTOPSTREAMER_LINK_LIBRARIES Qt5::Widgets ) +set(DEFLECT_DESKTOPSTREAMER_HOSTS + "\ +{\"DisplayWall Ground floor\", \"bbpav02.epfl.ch\"}, \ +{\"DisplayWall 3rd floor\", \"bbpav04.epfl.ch\"}, \ +{\"DisplayWall 5th floor\", \"bbpav05.epfl.ch\"}, \ +{\"DisplayWall 6th floor\", \"bbpav06.epfl.ch\"}" + CACHE STRING "List of default hosts for the DesktopStreamer application" +) +set_source_files_properties(MainWindow.cpp PROPERTIES COMPILE_DEFINITIONS + _HOSTS=${DEFLECT_DESKTOPSTREAMER_HOSTS} +) + if(DEFLECT_USE_SERVUS) list(APPEND DESKTOPSTREAMER_LINK_LIBRARIES Servus) endif() diff --git a/apps/DesktopStreamer/MainWindow.cpp b/apps/DesktopStreamer/MainWindow.cpp index b387d6c..9f246a1 100644 --- a/apps/DesktopStreamer/MainWindow.cpp +++ b/apps/DesktopStreamer/MainWindow.cpp @@ -69,12 +69,7 @@ typedef __int32 int32_t; namespace { -const std::vector< std::pair< QString, QString > > defaultHosts = { - { "DisplayWall Ground floor", "bbpav02.epfl.ch" }, - { "DisplayWall 3rd floor", "bbpav04.epfl.ch" }, - { "DisplayWall 5th floor", "bbpav05.epfl.ch" }, - { "DisplayWall 6th floor", "bbpav06.epfl.ch" } -}; +const std::vector< std::pair< QString, QString > > defaultHosts = { _HOSTS }; const QString streamButtonDefaultText = "Stream"; const QString streamSelected = "Stream selected item(s)"; } diff --git a/doc/Changelog.md b/doc/Changelog.md index 1a16ab3..7a1ceb2 100644 --- a/doc/Changelog.md +++ b/doc/Changelog.md @@ -5,6 +5,9 @@ Changelog {#Changelog} ### 0.12.0 (git master) +* [126](https://github.com/BlueBrain/Deflect/pull/126) + DesktopStreamer: The list of default hosts can be configured using the CMake + variable DEFLECT_DESKTOPSTREAMER_HOSTS. * [124](https://github.com/BlueBrain/Deflect/pull/124): QmlStreamer: Users can now interact with WebGL content in a WebEngineView and no longer risk opening a system context menu with a long press (prevent