Make QPoint have the same layout on all platforms
[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 module_qtbase_tests.subdir = tests
11 module_qtbase_tests.target = module-qtbase-tests
12 module_qtbase_tests.depends = module_qtbase_src
13 module_qtbase_tests.CONFIG = no_default_install
14
15 #process the projects
16 PROJECTS=$$eval($$list($$lower($$unique(QT_BUILD_PARTS))))
17 # note that the order matters for these blocks!
18 contains(PROJECTS, qmake) {
19     PROJECTS -= qmake
20     # nothing to be done
21 }
22 contains(PROJECTS, libs) {
23     PROJECTS -= libs
24     include(src/src.pro)
25 }
26 contains(PROJECTS, examples) {
27     PROJECTS -= examples
28     SUBDIRS += examples
29 }
30 contains(PROJECTS, demos) {
31     PROJECTS -= demos
32     SUBDIRS += demos
33 }
34 contains(PROJECTS, tests) {
35     PROJECTS -= tests
36     SUBDIRS += module_qtbase_tests
37 }
38 !isEmpty(PROJECTS) {
39     message(Unknown PROJECTS: $$PROJECTS)
40 }
41
42 !symbian: confclean.depends += clean
43 confclean.commands =
44 unix:!symbian {
45   confclean.commands += (cd config.tests/unix/stl && $(MAKE) distclean); \
46                         (cd config.tests/unix/endian && $(MAKE) distclean); \
47                         (cd config.tests/unix/ipv6 && $(MAKE) distclean); \
48                         (cd config.tests/unix/largefile && $(MAKE) distclean); \
49                         (cd config.tests/unix/ptrsize && $(MAKE) distclean); \
50                         (cd config.tests/x11/notype && $(MAKE) distclean); \
51                         (cd config.tests/unix/getaddrinfo && $(MAKE) distclean); \
52                         (cd config.tests/unix/cups && $(MAKE) distclean); \
53                         (cd config.tests/unix/psql && $(MAKE) distclean); \
54                         (cd config.tests/unix/mysql && $(MAKE) distclean); \
55                         (cd config.tests/unix/mysql_r && $(MAKE) distclean); \
56                         (cd config.tests/unix/nis && $(MAKE) distclean); \
57                         (cd config.tests/unix/nix && $(MAKE) distclean); \
58                         (cd config.tests/unix/iodbc && $(MAKE) distclean); \
59                         (cd config.tests/unix/odbc && $(MAKE) distclean); \
60                         (cd config.tests/unix/oci && $(MAKE) distclean); \
61                         (cd config.tests/unix/tds && $(MAKE) distclean); \
62                         (cd config.tests/unix/db2 && $(MAKE) distclean); \
63                         (cd config.tests/unix/ibase && $(MAKE) distclean); \
64                         (cd config.tests/unix/ipv6ifname && $(MAKE) distclean); \
65                         (cd config.tests/unix/zlib && $(MAKE) distclean); \
66                         (cd config.tests/unix/libmng && $(MAKE) distclean); \
67                         (cd config.tests/unix/sqlite2 && $(MAKE) distclean); \
68                         (cd config.tests/unix/libjpeg && $(MAKE) distclean); \
69                         (cd config.tests/unix/libpng && $(MAKE) distclean); \
70                         (cd config.tests/x11/xcursor && $(MAKE) distclean); \
71                         (cd config.tests/x11/xrender && $(MAKE) distclean); \
72                         (cd config.tests/x11/xrandr && $(MAKE) distclean); \
73                         (cd config.tests/x11/xkb && $(MAKE) distclean); \
74                         (cd config.tests/x11/xinput && $(MAKE) distclean); \
75                         (cd config.tests/x11/fontconfig && $(MAKE) distclean); \
76                         (cd config.tests/x11/xinerama && $(MAKE) distclean); \
77                         (cd config.tests/x11/sm && $(MAKE) distclean); \
78                         (cd config.tests/x11/xshape && $(MAKE) distclean); \
79                         (cd config.tests/x11/opengl && $(MAKE) distclean); \
80                         $(DEL_FILE) config.tests/.qmake.cache; \
81                         $(DEL_FILE) src/core/global/qconfig.h; \
82                         $(DEL_FILE) src/core/global/qconfig.cpp; \
83                         $(DEL_FILE) mkspecs/qconfig.pri; \
84                         $(DEL_FILE) .qmake.cache; \
85                         (cd qmake && $(MAKE) distclean);
86 }
87 win32 {
88   confclean.commands += -$(DEL_FILE) src\\core\\global\\qconfig.h $$escape_expand(\\n\\t) \
89                         -$(DEL_FILE) src\\core\\global\\qconfig.cpp $$escape_expand(\\n\\t) \
90                         -$(DEL_FILE) mkspecs\\qconfig.pri $$escape_expand(\\n\\t) \
91                         -$(DEL_FILE) .qmake.cache $$escape_expand(\\n\\t) \
92                         (cd qmake && $(MAKE) distclean)
93 }
94 symbian {
95   confclean.depends += distclean
96   contains(QMAKE_HOST.os, "Windows") {
97     confclean.commands += \
98             (cd src\\tools\\moc && $(MAKE) distclean) $$escape_expand(\\n\\t) \
99             (cd src\\tools\\rcc && $(MAKE) distclean) $$escape_expand(\\n\\t) \
100             (cd src\\tools\\uic && $(MAKE) distclean) $$escape_expand(\\n\\t) \
101             -$(DEL_FILE) src\\corelib\\global\\qconfig.h $$escape_expand(\\n\\t) \
102             -$(DEL_FILE) src\\corelib\\global\\qconfig.cpp $$escape_expand(\\n\\t) \
103             -$(DEL_FILE) mkspecs\\qconfig.pri $$escape_expand(\\n\\t) \
104             -$(DEL_FILE) .qmake.cache $$escape_expand(\\n\\t) \
105             (cd qmake && $(MAKE) distclean)
106   } else {
107     confclean.commands += \
108             (cd src/tools/moc && $(MAKE) distclean) $$escape_expand(\\n\\t) \
109             (cd src/tools/rcc && $(MAKE) distclean) $$escape_expand(\\n\\t) \
110             (cd src/tools/uic && $(MAKE) distclean) $$escape_expand(\\n\\t) \
111             -$(DEL_FILE) src/corelib/global/qconfig.h $$escape_expand(\\n\\t) \
112             -$(DEL_FILE) src/corelib/global/qconfig.cpp $$escape_expand(\\n\\t) \
113             -$(DEL_FILE) mkspecs/qconfig.pri $$escape_expand(\\n\\t) \
114             -$(DEL_FILE) .qmake.cache $$escape_expand(\\n\\t) \
115             (cd qmake && $(MAKE) distclean)
116   }
117 }
118 QMAKE_EXTRA_TARGETS += confclean
119 qmakeclean.commands += (cd qmake && $(MAKE) clean)
120 QMAKE_EXTRA_TARGETS += qmakeclean
121 CLEAN_DEPS += qmakeclean
122
123 CONFIG -= qt
124
125 ### installations ####
126
127 #qmake
128 qmake.path=$$[QT_INSTALL_BINS]
129 win32 {
130    qmake.files=$$QT_BUILD_TREE/bin/qmake.exe
131 } else {
132    qmake.files=$$QT_BUILD_TREE/bin/qmake
133 }
134 INSTALLS += qmake
135
136 #syncqt
137 syncqt.path=$$[QT_INSTALL_BINS]
138 syncqt.files=$$QT_BUILD_TREE/bin/syncqt
139 win32:syncqt.files=$$QT_BUILD_TREE/bin/syncqt.bat
140 INSTALLS += syncqt
141
142 #mkspecs
143 mkspecs.path=$$[QT_INSTALL_DATA]/mkspecs
144 mkspecs.files=$$QT_BUILD_TREE/mkspecs/qconfig.pri $$files($$QT_SOURCE_TREE/mkspecs/*)
145 mkspecs.files -= $$QT_SOURCE_TREE/mkspecs/modules
146 unix { 
147    DEFAULT_QMAKESPEC = $$QMAKESPEC
148    DEFAULT_QMAKESPEC ~= s,^.*mkspecs/,,g
149    mkspecs.commands += $(DEL_FILE) $(INSTALL_ROOT)$$mkspecs.path/default; $(SYMLINK) $$DEFAULT_QMAKESPEC $(INSTALL_ROOT)$$mkspecs.path/default
150    mkspecs.files -= $$QT_SOURCE_TREE/mkspecs/default
151 }
152 win32:!equals(QT_BUILD_TREE, $$QT_SOURCE_TREE) {
153     # When shadow building on Windows, the default mkspec only exists in the build tree.
154     mkspecs.files += $$QT_BUILD_TREE/mkspecs/default
155 }
156 INSTALLS += mkspecs