Skip to content
Permalink
Browse files

disable qt-unix-signals on windows (fixes build)

  • Loading branch information
jef-n committed Mar 6, 2019
1 parent 98ad2b1 commit fe5b399294df8534ed263211b7d138735e49f981
Showing with 10 additions and 1 deletion.
  1. +1 −1 external/qt-unix-signals/sigwatch.h
  2. +5 −0 src/app/CMakeLists.txt
  3. +4 −0 src/app/main.cpp
@@ -31,7 +31,7 @@

class UnixSignalWatcherPrivate;

#if Q_OS_WIN
#if !defined(Q_OS_WIN) && !defined(SIGINT)
const int SIGINT = 2;
const int SIGTERM = 15;
#endif
@@ -1,5 +1,7 @@
ADD_SUBDIRECTORY(../../external/libdxfrw dwg/libdxfrw)
IF(NOT WIN32)
SUBDIRS(${CMAKE_SOURCE_DIR}/external/qt-unix-signals)
ENDIF(NOT WIN32)

SET(QGIS_APP_SRCS
${CMAKE_SOURCE_DIR}/external/nmea/gmath.c
@@ -884,7 +886,10 @@ IF(WIN32)
ENDIF(WIN32)

TARGET_LINK_LIBRARIES(${QGIS_APP_NAME} qgis_native)

IF (NOT WIN32)
TARGET_LINK_LIBRARIES(${QGIS_APP_NAME} QTSignal)
ENDIF (NOT WIN32)

IF (APPLE)
SET_TARGET_PROPERTIES(${QGIS_APP_NAME} PROPERTIES
@@ -38,7 +38,9 @@
#include <cstdlib>
#include <cstdarg>

#if !defined(Q_OS_WIN)
#include "sigwatch.h"
#endif

#ifdef WIN32
// Open files in binary mode
@@ -1523,6 +1525,7 @@ int main( int argc, char *argv[] )
qgis->menuBar()->setVisible( true );
#endif

#if !defined(Q_OS_WIN)
UnixSignalWatcher sigwatch;
sigwatch.watchForSignal( SIGINT );

@@ -1538,6 +1541,7 @@ int main( int argc, char *argv[] )
break;
}
} );
#endif

int retval = myApp.exec();
delete qgis;

0 comments on commit fe5b399

Please sign in to comment.
You can’t perform that action at this time.