#-------------------------------------------------------------------------------
option(DISABLE_WERROR "Build without -Werror" FALSE)
+option(ENABLE_SIGNALS "Build with UNIX signals" TRUE)
option(ENABLE_SIGROKDECODE "Build with libsigrokdecode" FALSE)
option(ENABLE_TESTS "Enable unit tests" FALSE)
option(STATIC_PKGDEPS_LIBS "Statically link to (pkgconfig) libraries" FALSE)
# For boost-thread we need two additional settings on win32:
set(Boost_USE_STATIC_LIBS on)
add_definitions(-DBOOST_THREAD_USE_LIB)
+
+ # Windsws does not support UNIX signals
+ set(ENABLE_SIGNALS FALSE)
endif()
#===============================================================================
set(pulseview_SOURCES
main.cpp
- signalhandler.cpp
pv/mainwindow.cpp
pv/sigsession.cpp
pv/data/analog.cpp
)
set(pulseview_HEADERS
- signalhandler.h
pv/mainwindow.h
pv/sigsession.h
pv/dialogs/about.h
pulseview.qrc
)
+if(ENABLE_SIGNALS)
+ list(APPEND pulseview_SOURCES signalhandler.cpp)
+ list(APPEND pulseview_HEADERS signalhandler.h)
+endif()
+
qt4_wrap_cpp(pulseview_HEADERS_MOC ${pulseview_HEADERS})
qt4_wrap_ui(pulseview_FORMS_HEADERS ${pulseview_FORMS})
qt4_add_resources(pulseview_RESOURCES_RCC ${pulseview_RESOURCES})
#include <QtGui/QApplication>
#include <QDebug>
+#ifdef ENABLE_SIGNALS
#include "signalhandler.h"
+#endif
+
#include "pv/mainwindow.h"
#include "config.h"
pv::MainWindow w(open_file);
w.show();
+#ifdef ENABLE_SIGNALS
if(SignalHandler::prepare_signals()) {
SignalHandler *const handler =
new SignalHandler(&w);
qWarning() <<
"Could not prepare signal handler.";
}
+#endif
// Run the application
ret = a.exec();