diff --git a/CMakeModules/Translations.cmake b/CMakeModules/Translations.cmake index 9695829fa..5cc1f1367 100644 --- a/CMakeModules/Translations.cmake +++ b/CMakeModules/Translations.cmake @@ -40,4 +40,7 @@ if (${do_translate}) endforeach() file(APPEND ${translation_res} "\n") + + # set this so config.h can detect it + set(HAVE_QRC_TRANSLATIONS TRUE) endif() # of do translate \ No newline at end of file diff --git a/src/GUI/QtLauncher.cxx b/src/GUI/QtLauncher.cxx index 5973ad5bf..b21ee43e6 100644 --- a/src/GUI/QtLauncher.cxx +++ b/src/GUI/QtLauncher.cxx @@ -207,7 +207,9 @@ private: static void initQtResources() { Q_INIT_RESOURCE(resources); +#if defined(HAVE_QRC_TRANSLATIONS) Q_INIT_RESOURCE(translations); +#endif } static void simgearMessageOutput(QtMsgType type, const QMessageLogContext &context, const QString &msg) diff --git a/src/Include/config_cmake.h.in b/src/Include/config_cmake.h.in index dae4eafed..0656c8153 100644 --- a/src/Include/config_cmake.h.in +++ b/src/Include/config_cmake.h.in @@ -65,3 +65,6 @@ #define FG_BUILD_TYPE "@FG_BUILD_TYPE@" #define HAVE_PUI + +#cmakedefine HAVE_QRC_TRANSLATIONS +