Skip to content

Commit

Permalink
Merge pull request #23 from rdumusc/master
Browse files Browse the repository at this point in the history
Fix build and deployement of DesktopStreamer on OSX 10.7
  • Loading branch information
tribal-tec committed Jun 28, 2015
2 parents c2d3ecb + 368b799 commit fe2e03d
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .gitexternals
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# -*- mode: cmake -*-
# CMake/common https://github.com/Eyescale/CMake.git 5734155
# CMake/common https://github.com/Eyescale/CMake.git 188cf22
2 changes: 1 addition & 1 deletion .gitsubprojects
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# -*- mode: cmake -*-
git_subproject(Servus https://github.com/HBPVIS/Servus d910737)
git_subproject(Servus https://github.com/HBPVIS/Servus 0e1db45)
8 changes: 6 additions & 2 deletions apps/DesktopStreamer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,12 @@ if(APPLE)
set(DESKTOPSTREAMER_ICON desktopstreamer.icns)

list(APPEND DESKTOPSTREAMER_SOURCES AppNapSuspender.mm)
list(APPEND DESKTOPSTREAMER_LINK_LIBRARIES
"-framework Foundation -framework CoreGraphics")
list(APPEND DESKTOPSTREAMER_LINK_LIBRARIES "-framework Foundation")
if(OSX_VERSION VERSION_LESS 10.9)
list(APPEND DESKTOPSTREAMER_LINK_LIBRARIES "-framework ApplicationServices")
else()
list(APPEND DESKTOPSTREAMER_LINK_LIBRARIES "-framework CoreGraphics")
endif()
elseif(WIN32)
list(APPEND DESKTOPSTREAMER_LINK_LIBRARIES Ws2_32)
endif()
Expand Down
2 changes: 2 additions & 0 deletions apps/DesktopStreamer/DesktopSelectionView.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
#ifndef DESKTOP_SELECTION_VIEW_H
#define DESKTOP_SELECTION_VIEW_H

#include <deflect/config.h>

#include <QtWidgets>

class DesktopSelectionRectangle;
Expand Down
8 changes: 7 additions & 1 deletion apps/DesktopStreamer/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@ typedef __int32 int32_t;
#endif

#ifdef __APPLE__
# include <CoreGraphics/CoreGraphics.h>
# if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_9
# include <CoreGraphics/CoreGraphics.h>
# else
# include <ApplicationServices/ApplicationServices.h>
# endif
#endif

#define SHARE_DESKTOP_UPDATE_DELAY 1
Expand Down Expand Up @@ -198,6 +202,8 @@ void MainWindow::_startStreaming()

#ifdef __APPLE__
_napSuspender.suspend();
#endif
#ifdef DEFLECT_USE_SERVUS
_browseTimer.stop();
#endif
_updateTimer.start( SHARE_DESKTOP_UPDATE_DELAY );
Expand Down

0 comments on commit fe2e03d

Please sign in to comment.