3 [ "$OMK_RULES" -a "$OMK_RULES" != linux ] && exit 0
8 touch config.omk-default
11 [ -d $QTDIR ] || canttest "Can't find QT4 instalation"
13 # Function to create a QT app using an OMK-built library
14 function create_qt_app() {
16 cat > 'somelib/somelib.c' <<'EOF'
19 int some_function(int num)
21 return SOME_CONST - num;
24 cat > 'somelib/Makefile.omk' <<'EOF'
25 include_HEADERS = header.h
26 shared_LIBRARIES = somelib
29 somelib_SOURCES = somelib.c
31 cat > 'somelib/header.h' <<'EOF'
35 #define SOME_CONST 123
41 int some_function(int);
50 cat > 'qtapp/qtapp.cxx' <<'EOF'
51 #include <QApplication>
52 #include <QPushButton>
55 int main(int argc, char *argv[])
57 QApplication app(argc, argv);
59 some_function(SOME_CONST);
60 QPushButton hello("Hello world!");
61 hello.resize(100, 30);
67 cat > 'qtapp/qtapp.pro' <<'EOF'
68 ######################################################################
69 # Automatically generated by qmake (2.01a) po ?rc 16 18:49:31 2007
70 ######################################################################
83 ############################
85 ############################
87 WVSTART "QT_SUBDIRS in top-level Makefile.omk"
89 cat > 'Makefile.omk' <<'EOF'
95 WVPASS test -x _compiled/bin/qtapp
97 WVSTART "QT_SUBDIRS in a subdir"
99 echo "SUBDIRS = somelib dir" > Makefile.omk
102 echo 'QT_SUBDIRS = qtapp' > 'dir/Makefile.omk'
105 WVPASS test -x _compiled/bin/qtapp
107 WVSTART "QT_PROJECTS variable"
109 echo 'QT_PROJECTS=qtapp.pro' > 'qtapp/Makefile.omk'
110 echo "SUBDIRS = somelib qtapp" > Makefile.omk
113 WVPASS test -x _compiled/bin/qtapp