]> rtime.felk.cvut.cz Git - omk.git/commitdiff
QT: qmake location can be specified by QMAKE variable
authorMichal Sojka <sojkam1@fel.cvut.cz>
Wed, 4 Nov 2009 16:04:12 +0000 (17:04 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Wed, 4 Nov 2009 16:04:12 +0000 (17:04 +0100)
This is necessary on systems like Fedora, where qmake is not linked from
/usr/share/qt4/bin (like in Debian/Ubuntu), but is stored only in
/usr/bin.

snippets/qt.omk
tests/qt/runtest
tests/qt/runtest-qmake [new file with mode: 0755]
tests/qt/runtest-qmake.rules [new symlink]
tests/qt/test.inc [new file with mode: 0644]

index b9212970c86993534ac31adad74ead00c169f83c..3bd33dc302bb88e856bd4b8344876857d42bcca6 100644 (file)
@@ -12,7 +12,7 @@ define qt_project_template
 # FIXME: Handle multiple .pro files correctly
 $(LOCAL_BUILD_DIR)/$(dir $(1))Makefile: $(SOURCES_DIR)/$(1)
        $(Q)mkdir -p $$(dir $$(@)) && cd $$(dir $$(@)) &&               \
-       $(QTDIR:%=%/bin/)qmake                                          \
+       $(if $(QMAKE),$(QMAKE),$(QTDIR:%=%/bin/)qmake)                  \
             TOP_DIR=$(OUTPUT_DIR)                                      \
             RELATIVE_DIR=$(RELATIVE_PREFIX)$(dir $(1))                 \
             $(QTDIR:%=QTDIR=%) CC=$(CC) CXX=$(CXX)                     \
index 96bf360b94951257530e71af09d2a1ec7c545644..07826bb42e693028eaaf97c6d11901e50cd8442b 100755 (executable)
@@ -7,20 +7,4 @@ QTDIR=/usr/share/qt4
 export QTDIR
 [ -d $QTDIR ] || canttest "Can't find QT4 instalation"
 
-cp Makefile1.omk Makefile.omk
-make || error "QT compilation"
-[ -x _compiled/bin/qtapp ] || error "QT application was not compiled"
-
-make clean || error "QT clean 1"
-
-cp Makefile2.omk Makefile.omk
-make || error "QT Compilation in subdir"
-[ -x _compiled/bin/qtapp ] || error "QT application was not compiled"
-
-make clean || error "QT clean 2"
-
-cp Makefile3.omk Makefile.omk
-make || error "QT_PROJECT test "
-[ -x _compiled/bin/qtapp ] || error "QT application was not compiled"
-
-make clean || error "QT clean 3"
+. ./test.inc
diff --git a/tests/qt/runtest-qmake b/tests/qt/runtest-qmake
new file mode 100755 (executable)
index 0000000..aec2b0f
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+. ../functions.sh
+
+touch config.omk-default
+QTDIR=/usr/share/qt4
+export QTDIR
+[ -d $QTDIR ] || canttest "Can't find QT4 instalation"
+
+QMAKE=qmake-qt4
+export QMAKE
+
+. ./test.inc
diff --git a/tests/qt/runtest-qmake.rules b/tests/qt/runtest-qmake.rules
new file mode 120000 (symlink)
index 0000000..e61ef2d
--- /dev/null
@@ -0,0 +1 @@
+runtest.rules
\ No newline at end of file
diff --git a/tests/qt/test.inc b/tests/qt/test.inc
new file mode 100644 (file)
index 0000000..684fa2c
--- /dev/null
@@ -0,0 +1,17 @@
+cp Makefile1.omk Makefile.omk
+make || error "QT compilation"
+[ -x _compiled/bin/qtapp ] || error "QT application was not compiled"
+
+make clean || error "QT clean 1"
+
+cp Makefile2.omk Makefile.omk
+make || error "QT Compilation in subdir"
+[ -x _compiled/bin/qtapp ] || error "QT application was not compiled"
+
+make clean || error "QT clean 2"
+
+cp Makefile3.omk Makefile.omk
+make || error "QT_PROJECT test "
+[ -x _compiled/bin/qtapp ] || error "QT application was not compiled"
+
+make clean || error "QT clean 3"