option(ENABLE_TESTS "Set to ON to build test applications (default)" ON)
option(ENABLE_FGCOM "Set to ON to build the FGCom application (default)" ON)
option(ENABLE_FLITE "Set to ON to build the Flite text-to-speech module" ON)
+option(ENABLE_QT "Set to ON to build the internal Qt launcher" ON)
if(LOGGING)
# nothing
##############################################################################
## Qt5 setup setup
-
-find_package(Qt5 5.1 COMPONENTS Widgets)
-if (Qt5Widgets_FOUND)
- message(STATUS "Will enable Qt launcher GUI")
- set(HAVE_QT 1)
-endif()
-
+if (ENABLE_QT)
+ message(STATUS "Qt launcher enabled, checking for Qt 5.1 / qmake")
+ find_package(Qt5 5.1 COMPONENTS Widgets)
+ if (Qt5Widgets_FOUND)
+ message(STATUS "Will enable Qt launcher GUI")
+ set(HAVE_QT 1)
+ endif()
+endif (ENABLE_QT)
##############################################################################
find_package(PLIB REQUIRED puaux pu js fnt)
// Main top level initialization
int fgMainInit( int argc, char **argv )
{
-#if defined(HAVE_QT)
- QApplication app(argc, argv);
- app.setOrganizationName("FlightGear");
- app.setApplicationName("FlightGear");
- app.setOrganizationDomain("flightgear.org");
-#endif
-
// set default log levels
sglog().setLogLevels( SG_ALL, SG_ALERT );
// environment variables. This avoids needed a wrapper shell-script on OS-X.
showLauncher |= (::getenv("FG_LAUNCHER") != 0);
- if (showLauncher) {
+ if (showLauncher) {
+ QApplication app(argc, argv);
+ app.setOrganizationName("FlightGear");
+ app.setApplicationName("FlightGear");
+ app.setOrganizationDomain("flightgear.org");
+
// avoid double Apple menu and other weirdness if both Qt and OSG
// try to initialise various Cocoa structures.
flightgear::WindowBuilder::setPoseAsStandaloneApp(false);