summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaromil <jaromil@dyne.org>2011-03-07 02:08:39 (GMT)
committer Jaromil <jaromil@dyne.org>2011-03-07 02:08:39 (GMT)
commitbd507680e537df5a24919a3e0766c451afe34851 (patch)
treea36642579eb28e3d8e7646a5ebfa19b1fc2d5376
parent89ece0bccb35d7d012ea5685655f314cad7fa10e (diff)
generate qt ui files with uic
-rw-r--r--qt/Makefile.am15
-rw-r--r--qt/ui_qfreej.ui (renamed from qt/qfreej.ui)0
2 files changed, 14 insertions, 1 deletions
diff --git a/qt/Makefile.am b/qt/Makefile.am
index 4759378..b3ed3c6 100644
--- a/qt/Makefile.am
+++ b/qt/Makefile.am
@@ -2,7 +2,20 @@ AM_CXXFLAGS = -I$(top_srcdir)/src/include $(SDL_CFLAGS) \
$(QTGUI_CFLAGS) -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED \
-DPREFIX="\"$(prefix)\"" -DDATADIR="\"$(datadir)\""
-SOURCES = main.cpp \
+%.h: %.ui
+ uic -o $@ $<
+%.cpp: %.ui
+ uic -o $@ -impl $*.h $<
+# This rule lets GNU make create any moc_*.cpp from the equivalent *.h
+# You have one .h file, it's called myapp.h. Therefore, here I list
+# its mocced name, moc_myapp.cpp.
+moc_%.cpp: %.h
+ moc $< -o $@
+
+qfreej_ui = ui_qfreej.h
+ui_qfreej.h: ui_qfreej.ui
+
+SOURCES = ui_qfreej.h main.cpp \
qfreej.cpp \
QqComboBlit.cpp \
QqWidget.cpp \
diff --git a/qt/qfreej.ui b/qt/ui_qfreej.ui
index f9478bc..f9478bc 100644
--- a/qt/qfreej.ui
+++ b/qt/ui_qfreej.ui