Build examples and demos in qtbase
[profile/ivi/qtbase.git] / qtbase.pro
1 #####################################################################
2 # Main projectfile
3 #####################################################################
4
5 CONFIG += ordered
6 TEMPLATE = subdirs
7
8 cross_compile: CONFIG += nostrip
9
10 #process the projects
11 for(PROJECT, $$list($$lower($$unique(QT_BUILD_PARTS)))) {
12     isEqual(PROJECT, examples) {
13        SUBDIRS += examples
14     } else:isEqual(PROJECT, demos) {
15        SUBDIRS += demos
16     } else:isEqual(PROJECT, libs) {
17        include(src/src.pro)
18     } else:isEqual(PROJECT, qmake) {
19 #      SUBDIRS += qmake
20     } else {
21        message(Unknown PROJECT: $$PROJECT)
22     }
23 }
24
25 !symbian: confclean.depends += clean
26 confclean.commands =
27 unix:!symbian {
28   confclean.commands += (cd config.tests/unix/stl && $(MAKE) distclean); \
29                         (cd config.tests/unix/endian && $(MAKE) distclean); \
30                         (cd config.tests/unix/ipv6 && $(MAKE) distclean); \
31                         (cd config.tests/unix/largefile && $(MAKE) distclean); \
32                         (cd config.tests/unix/ptrsize && $(MAKE) distclean); \
33                         (cd config.tests/x11/notype && $(MAKE) distclean); \
34                         (cd config.tests/unix/getaddrinfo && $(MAKE) distclean); \
35                         (cd config.tests/unix/cups && $(MAKE) distclean); \
36                         (cd config.tests/unix/psql && $(MAKE) distclean); \
37                         (cd config.tests/unix/mysql && $(MAKE) distclean); \
38                         (cd config.tests/unix/mysql_r && $(MAKE) distclean); \
39                         (cd config.tests/unix/nis && $(MAKE) distclean); \
40                         (cd config.tests/unix/nix && $(MAKE) distclean); \
41                         (cd config.tests/unix/iodbc && $(MAKE) distclean); \
42                         (cd config.tests/unix/odbc && $(MAKE) distclean); \
43                         (cd config.tests/unix/oci && $(MAKE) distclean); \
44                         (cd config.tests/unix/tds && $(MAKE) distclean); \
45                         (cd config.tests/unix/db2 && $(MAKE) distclean); \
46                         (cd config.tests/unix/ibase && $(MAKE) distclean); \
47                         (cd config.tests/unix/ipv6ifname && $(MAKE) distclean); \
48                         (cd config.tests/unix/zlib && $(MAKE) distclean); \
49                         (cd config.tests/unix/libmng && $(MAKE) distclean); \
50                         (cd config.tests/unix/sqlite2 && $(MAKE) distclean); \
51                         (cd config.tests/unix/libjpeg && $(MAKE) distclean); \
52                         (cd config.tests/unix/libpng && $(MAKE) distclean); \
53                         (cd config.tests/x11/xcursor && $(MAKE) distclean); \
54                         (cd config.tests/x11/xrender && $(MAKE) distclean); \
55                         (cd config.tests/x11/xrandr && $(MAKE) distclean); \
56                         (cd config.tests/x11/xkb && $(MAKE) distclean); \
57                         (cd config.tests/x11/xinput && $(MAKE) distclean); \
58                         (cd config.tests/x11/fontconfig && $(MAKE) distclean); \
59                         (cd config.tests/x11/xinerama && $(MAKE) distclean); \
60                         (cd config.tests/x11/sm && $(MAKE) distclean); \
61                         (cd config.tests/x11/xshape && $(MAKE) distclean); \
62                         (cd config.tests/x11/opengl && $(MAKE) distclean); \
63                         $(DEL_FILE) config.tests/.qmake.cache; \
64                         $(DEL_FILE) src/core/global/qconfig.h; \
65                         $(DEL_FILE) src/core/global/qconfig.cpp; \
66                         $(DEL_FILE) mkspecs/qconfig.pri; \
67                         $(DEL_FILE) .qmake.cache; \
68                         (cd qmake && $(MAKE) distclean);
69 }
70 win32 {
71   confclean.commands += -$(DEL_FILE) src\\core\\global\\qconfig.h $$escape_expand(\\n\\t) \
72                         -$(DEL_FILE) src\\core\\global\\qconfig.cpp $$escape_expand(\\n\\t) \
73                         -$(DEL_FILE) mkspecs\\qconfig.pri $$escape_expand(\\n\\t) \
74                         -$(DEL_FILE) .qmake.cache $$escape_expand(\\n\\t) \
75                         (cd qmake && $(MAKE) distclean)
76 }
77 symbian {
78   confclean.depends += distclean
79   contains(QMAKE_HOST.os, "Windows") {
80     confclean.commands += \
81             (cd src\\tools\\moc && $(MAKE) distclean) $$escape_expand(\\n\\t) \
82             (cd src\\tools\\rcc && $(MAKE) distclean) $$escape_expand(\\n\\t) \
83             (cd src\\tools\\uic && $(MAKE) distclean) $$escape_expand(\\n\\t) \
84             -$(DEL_FILE) src\\corelib\\global\\qconfig.h $$escape_expand(\\n\\t) \
85             -$(DEL_FILE) src\\corelib\\global\\qconfig.cpp $$escape_expand(\\n\\t) \
86             -$(DEL_FILE) mkspecs\\qconfig.pri $$escape_expand(\\n\\t) \
87             -$(DEL_FILE) .qmake.cache $$escape_expand(\\n\\t) \
88             (cd qmake && $(MAKE) distclean)
89   } else {
90     confclean.commands += \
91             (cd src/tools/moc && $(MAKE) distclean) $$escape_expand(\\n\\t) \
92             (cd src/tools/rcc && $(MAKE) distclean) $$escape_expand(\\n\\t) \
93             (cd src/tools/uic && $(MAKE) distclean) $$escape_expand(\\n\\t) \
94             -$(DEL_FILE) src/corelib/global/qconfig.h $$escape_expand(\\n\\t) \
95             -$(DEL_FILE) src/corelib/global/qconfig.cpp $$escape_expand(\\n\\t) \
96             -$(DEL_FILE) mkspecs/qconfig.pri $$escape_expand(\\n\\t) \
97             -$(DEL_FILE) .qmake.cache $$escape_expand(\\n\\t) \
98             (cd qmake && $(MAKE) distclean)
99   }
100 }
101 QMAKE_EXTRA_TARGETS += confclean
102 qmakeclean.commands += (cd qmake && $(MAKE) clean)
103 QMAKE_EXTRA_TARGETS += qmakeclean
104 CLEAN_DEPS += qmakeclean
105
106 CONFIG -= qt
107
108 ### installations ####
109
110 #qmake
111 qmake.path=$$[QT_INSTALL_BINS]
112 win32 {
113    qmake.files=$$QT_BUILD_TREE/bin/qmake.exe
114 } else {
115    qmake.files=$$QT_BUILD_TREE/bin/qmake
116 }
117 INSTALLS += qmake
118
119 #mkspecs
120 mkspecs.path=$$[QT_INSTALL_DATA]/mkspecs
121 mkspecs.files=$$QT_BUILD_TREE/mkspecs/qconfig.pri $$files($$QT_SOURCE_TREE/mkspecs/*)
122 mkspecs.files -= $$QT_SOURCE_TREE/mkspecs/modules
123 unix { 
124    DEFAULT_QMAKESPEC = $$QMAKESPEC
125    DEFAULT_QMAKESPEC ~= s,^.*mkspecs/,,g
126    mkspecs.commands += $(DEL_FILE) $(INSTALL_ROOT)$$mkspecs.path/default; $(SYMLINK) $$DEFAULT_QMAKESPEC $(INSTALL_ROOT)$$mkspecs.path/default
127    mkspecs.files -= $$QT_SOURCE_TREE/mkspecs/default
128 }
129 win32:!equals(QT_BUILD_TREE, $$QT_SOURCE_TREE) {
130     # When shadow building on Windows, the default mkspec only exists in the build tree.
131     mkspecs.files += $$QT_BUILD_TREE/mkspecs/default
132 }
133 INSTALLS += mkspecs