be more informative when DISPLAY isn't set under unix
authorDiane Trout <diane@caltech.edu>
Thu, 15 Jun 2006 06:10:29 +0000 (06:10 +0000)
committerDiane Trout <diane@caltech.edu>
Thu, 15 Jun 2006 06:10:29 +0000 (06:10 +0000)
gui/CMakeLists.txt
qui/mussagl.cpp

index 663c6cc20f1435d2fc2b4bf2bcccbf60bcdf5413..e81ea92005a4644bdf19dd9eb12fcb6ead101dd6 100644 (file)
@@ -7,6 +7,8 @@ IF(FLTK_INCLUDE_DIR)
 ENDIF(FLTK_INCLUDE_DIR)
 
 FIND_PACKAGE(Boost)
+FIND_PACKAGE(Qt4)
+INCLUDE( ${QT_USE_FILE} )
 
 SET(SOURCES 
       AnnotWindow.cpp
index dcf393b146178300d918aa6b6d912910ee8bf8d4..3d45cb7dc9c164afd1f3ed6a82337aa87e4c6d2c 100644 (file)
@@ -21,6 +21,9 @@ int main(int argc, char **argv)
   // if we're under unix and don't have a display, see if we can still run
 #ifdef Q_WS_X11
   opts.useGUI = getenv("DISPLAY") != 0;
+  if (opts.useGUI == false) {
+    std::clog << "DISPLAY not set, running in console mode only" << std::endl;
+  }
 #endif
 
   QApplication app(argc, argv, opts.useGUI);