libmurphy_qt_la_LIBADD = $(QTCORE_LIBS)
-libmurphy_qt_la_DEPENDENCIES =
+libmurphy_qt_la_DEPENDENCIES = \
linker-script.qt \
$(filter %.la, $(libmurphy_qt_la_LIBADD))
mainloop_test_LDADD += ../../libmurphy-glib.la $(GLIB_LIBS)
endif
+if QT_ENABLED
noinst_LTLIBRARIES = libmainloop-qt-test.la
libmainloop_qt_test_la_SOURCES = mainloop-qt-test.cpp
libmainloop_qt_test_la_CPPFLAGS = $(AM_CFLAGS) $(QTCORE_CFLAGS)
-libmainloop_qt_test_la_LIBADD = ../../libmurphy-common.la
-mainloop_test_LDADD += libmainloop-qt-test.la
-
-if QT_ENABLED
-libmainloop_qt_test_la_LIBADD += ../../libmurphy-qt.la $(QTCORE_LIBS)
-mainloop_test_LDADD += ../../libmurphy-qt.la $(QTCORE_LIBS)
+libmainloop_qt_test_la_LIBADD = ../../libmurphy-common.la \
+ ../../libmurphy-qt.la $(QTCORE_LIBS)
+mainloop_test_LDADD += libmainloop-qt-test.la $(QTCORE_LIBS) -lstdc++
endif
# msg test
#include "mainloop-qt-test.h"
-#ifdef QT_ENABLED
#include <QCoreApplication>
#include <murphy/common/qt-glue.h>
else
return FALSE;
}
-
-#else // QT_ENABLED
-
-mrp_mainloop_t *qt_mainloop_create()
-{
- mrp_log_error("Qt mainloop support is not available.");
- exit(1);
-}
-
-int qt_mainloop_run()
-{
- mrp_log_error("Qt mainloop support is not available.");
- exit(1);
-}
-
-int qt_mainloop_quit()
-{
- mrp_log_error("Qt mainloop support is not available.");
- exit(1);
-}
-
-int qt_mainloop_cleanup(mrp_mainloop_t *ml)
-{
- MRP_UNUSED(ml);
-
- mrp_log_error("Qt mainloop support is not available.");
- exit(1);
-}
-
-#endif // QT_ENABLED
glib_mainloop_create(cfg);
break;
+#ifdef QT_ENABLED
case MAINLOOP_QT:
cfg->ml = qt_mainloop_create();
break;
+#endif
default:
mrp_log_error("Invalid mainloop type 0x%x.", cfg->mainloop_type);
glib_mainloop_run(cfg);
break;
+#ifdef QT_ENABLED
case MAINLOOP_QT:
qt_mainloop_run();
break;
+#endif
default:
mrp_log_error("Invalid mainloop type 0x%x.", cfg->mainloop_type);
glib_mainloop_quit(cfg);
break;
+#ifdef QT_ENABLED
case MAINLOOP_QT:
qt_mainloop_quit();
break;
+#endif
default:
mrp_log_error("Invalid mainloop type 0x%x.", cfg->mainloop_type);
glib_mainloop_cleanup(cfg);
break;
+#ifdef QT_ENABLED
case MAINLOOP_QT:
qt_mainloop_cleanup(cfg->ml);
cfg->ml = NULL;
break;
+#endif
default:
mrp_log_error("Unknown mainloop type (0x%x).", cfg->mainloop_type);