Commit Graph

931 Commits

Author SHA1 Message Date
Oswald Buddenhagen
01270cf672 fix bundled header creation for debug builds
the only case where we want to skip copying the bundled data (which is an
optimization only) is the debug sub-build when we are actually building
both debug and release.

Change-Id: I1f3f67ccd9a64033b133ffaf58639cd9f7107c27
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-06-25 09:18:35 +02:00
Oswald Buddenhagen
6d61dfdbb7 disable non-framework header install also for debug builds
i see no particular reason why debug builds should still get
"normal" headers.

Change-Id: I3625648549e8c234a365bab26823190ed2219cdf
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-06-25 09:18:31 +02:00
Oswald Buddenhagen
7ea8c9d0f0 install private headers into frameworks
Task-number: QTBUG-31641
Change-Id: Ifadc380c0a8983b2be93194e2e2257494b13dff8
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-06-25 09:18:25 +02:00
Oswald Buddenhagen
c0d5a4ee12 don't needlessly do QMAKE_BUNDLE_DATA+=FRAMEWORK_HEADERS
there is no point in adding a structure we don't actually define.

Change-Id: Ica43123f17eca6ebd4b5b7ec2526ebabef31c82a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-06-25 09:18:21 +02:00
Oswald Buddenhagen
7090d4a458 un-nest conditionals
it's cleaner, and it makes it possible to actually have a single else
branch.

Change-Id: I5ef917b678e2bd5a2face8ee19e942e5e952aa80
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-06-25 09:18:17 +02:00
Oswald Buddenhagen
d0e82ede55 mac framework build: always set QMAKE_FRAMEWORKPATH
don't mess with the -F linker flag manually. qt headers include other
headers via the canonical Module/Header syntax, which means that the
compiler also needs the -F flag. QMAKE_FRAMEWORKPATH does exactly that.

Task-number: QTBUG-29003
Change-Id: I5f4af1a462697cd6996c54436ccdb9fc2b216020
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-25 09:18:13 +02:00
Tor Arne Vestbø
d0d158f092 Mac: Ensure that C++11 is always used when linking against a static Qt build
If Qt was built with C++11, it links to libc++, and we need all projects
that use Qt to link against the same library.

Technically, we could do QMAKE_LFLAGS += -stdlib=libc++, but that hasn't
been tested enough without also enabling C++11, so we keep the
relationship between the two for now.

Change-Id: Ic628bcbade60cc82f93707f372c2119c24d9dc8a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Liang Qi <liang.qi@digia.com>
2013-06-24 14:51:50 +02:00
Stephen Kelly
91ca90d896 CMake: Fix test for value starting with -L
Change-Id: I02ba45beca09c2eb1b1fbdc2a8f6efbc783bd72d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-06-21 18:22:00 +02:00
Oswald Buddenhagen
172fa29dff fix LD_LIBRARY_PATH manipulation in uic calls not being make-escaped
the evaluator has the bug that function arguments are inherited.
work around that by passing an explicitly empty 3rd parameter to
qtAddTargetEnv().
proper fix upcoming in less critical branch.

Change-Id: Ic45cc890abaa6271985590d4ebe02c96bff6dec4
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-20 12:49:14 +02:00
Oswald Buddenhagen
17c38b25f4 fix rcc & uic .depend_commands
unlike the .command, the .depend_command is not executed by make via its
chosen shell, but qmake itself via the system's native shell.
consequently, it needs different path separators and no make-escaping.

Task-number: QTBUG-31289
Change-Id: I480f815753632db6e8d4725f463f8a1fc59680a6
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-15 21:39:34 +02:00
Oswald Buddenhagen
9d48f14a3c always $-escape make commands
nmake needs %-escaping in addition to $-escaping, not instead.
this has little practical impact, so it went unnoticed.

Change-Id: I144b6142eec0151d83a22e0ac5ead7b0415cdafa
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-15 21:39:22 +02:00
Oswald Buddenhagen
c932f2cc13 fix command over-escaping in vcproj files
the vs ide executes the commands verbatim, so they must not be
make-escaped.

Task-number: QTBUG-31289
Change-Id: Ie73fd5c4da5527c2d10bc94ccdf60f8a1ca21351
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-15 21:39:17 +02:00
Oswald Buddenhagen
13e01fda19 assemble the tool commands at use time, after all
the precise syntax depends on what exactly the command is used for, so
we need to resolve it at the last moment. see followup commits.

This logically reverts commits 6f4ff81380
and 731e6bece5.

Change-Id: If285c91d7521069be86d32593b5c2ae2027b3038
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-15 21:39:12 +02:00
Stephen Kelly
703cca8bb7 Adjust the cmake files to find the dlls in the bin dir.
Change-Id: I840f963c3648d123b31f79aa2c8902c0ad74e982
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-06-15 19:04:53 +02:00
Oswald Buddenhagen
6bf5ef044f remove overquoting of extra compiler arguments
qmake automatically escapes the ${expandos}.

Change-Id: If74b6d2f2c68ff50785fdcbb66351122a273051f
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-12 10:10:50 +02:00
Oswald Buddenhagen
7f6c864157 remove overquoting of extra compiler commands
the commands are already quoted appropriately for the shell.

Change-Id: I746bb5fba2cd6548c5dc7ef81087c69a200ecbb8
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-12 10:10:47 +02:00
Oswald Buddenhagen
aa3f1cc8c6 fix QMAKE_COMPILER fallback for clang specs
in the actual specs, we also set 'gcc' for clang.

Change-Id: Ifc6b27d56596f34c944205795d665f545d090f80
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
2013-06-12 10:10:44 +02:00
Stephen Kelly
1937012b3e Don't test existence of private header directories for mac frameworks
These directories are not currently part of the Qt installation for mac
frameworks.

Task-number: QTBUG-31641

Change-Id: Ifef372cc2ebb692f9ae5a7b1f8dba5f683d1e7eb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-06-10 23:29:49 +02:00
Stephen Kelly
e1109df7a9 Remove the use of CMAKE_FIND_ROOT_PATH.
This is actually a list in CMake, not a value to be prepended
to paths. Specify the QT_SYSROOT instead to root the location
of include directories. CMake will soon get a CMAKE_SYSROOT
variable which will replace this.

Change-Id: I239f69f127f3676a3835aa4f29638f44ef209819
Reviewed-by: Volker Krause <volker.krause@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-06-10 23:29:40 +02:00
Fawzi Mohamed
d7b79ff3ef mkspecs/qml_plugin: adding -nonrelocatable flag to qmldump call
nonrelocatable adds the full uri to the exported type information
which is the correct thing to do for the qt plugins (and 99% of
the cases).
This way import bla.x 1.0 works correctly in the code model.

Change-Id: Ia06873dd8b2ea4627e3297a98e8df87275ceaf73
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-06-10 23:29:36 +02:00
Oswald Buddenhagen
4fd568fa06 redo include path logic for pre-generated headers
make the include dir in the source tree the "main" include path, as
that's where the majority of the headers is. then selectively add the
shadowed dirs.

Change-Id: I03ad13cfcf77175c141b94d41b1221740d851faf
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-10 21:12:29 +02:00
Oswald Buddenhagen
f3331e14e6 reshuffle path setup
rename MODULE_PROFILE_DIR to MODULE_BASE_INDIR.
force MODULE_BASE_OUTDIR to be always the shadow of the above.
rename MODULE_BASE_DIR to MODULE_SYNCQT_DIR (the former is still
recognized for backwards compat with webkit).

the idea behind these changes is making the variable names and override
possibilities reflect their actual use.

Change-Id: Ica4062d7231a0ce13241670e0d0f43e6b1b97160
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-10 21:12:24 +02:00
Oswald Buddenhagen
81b942f0d1 use correct variable for library base path
Change-Id: I6d621db2c4d5365a9c9a7284026b464e663a4cc6
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-10 21:12:20 +02:00
Oswald Buddenhagen
f533941179 update some comments relating to forwarding module pri files
Change-Id: I3486f949fee2ac977e3cde669188790e5f4b3167
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-10 21:12:17 +02:00
Oswald Buddenhagen
366d276f8c allow modules to extend their MODULE_{,PRIVATE_}INCLUDES
Change-Id: I5e401edbe891846579cf6d9ff84427d16783923b
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-10 21:12:09 +02:00
Stephen Kelly
04830dbcb2 Strip the -L dirs when processing GL dirs for the CMake files.
The generated cmake files expect only the names of libraries, so the
existence of directories causes erroneous fatal errors when attempting
to use Qt5Gui, if pkg-config returns a -L entry from

 pkg-config --libs egl

Change-Id: Iec50b4be68ab643c3c02abce2435a98e69955138
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
2013-06-06 09:08:41 +02:00
Oswald Buddenhagen
07337def65 don't add absent private include paths to non-git builds
all private headers are created by syncqt (and are thus in the source
dir), so we can simply override the normal (build dir based) paths
instead of extending them.

Change-Id: I9c1f3344c401b481b3f3d2295515f1aabffaa9a0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-06-05 10:39:47 +02:00
Oswald Buddenhagen
53698f3e7c fix non-git non-shadow non-prefix non-qtbase builds
these builds usually assume all headers in the qtbase build (== source
== install) dir, so the path for adding our pre-generated per-module
include paths needs to be triggered explicitly.

Change-Id: I57ec441d58cdf8186907ee6c36dce08daa206c49
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-05 10:37:29 +02:00
Oswald Buddenhagen
0a1b89bff5 run syncqt only for builds from git
the logic in the configures was even trying to express that, only that
nowadays we always ship syncqt, so the tests were kinda pointless.

this frees us from the perl dependency for non-developer builds of
packaged modules (except for webkit, which needs almost every scripting
language on earth anyway).

obviously, this requires that the packaging scripts run syncqt in the
source dir before tarring up the sources. note that for repositories
other than qtbase, the -version argument needs to be passed to syncqt.

Task-number: QTBUG-29465
Change-Id: Ic929ab17a5de4b30fbf48b3aa9bfa3b4d2ef37d6
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-03 17:59:47 +02:00
Oswald Buddenhagen
96557bc389 move module master header generation back to syncqt
now that we split out the part that depends on the project file, we can
do it cleanly here.
this way we can generate these headers at pre-build time already.
and for git builds, perl is probably faster than qmake at this task.

Change-Id: I343255c6de22329471a3ae2c2aac9ebeb160a501
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-03 17:59:42 +02:00
Oswald Buddenhagen
0519129c59 split out dependencies from module master header
this will allow us the create the dependency list in a different way
than the rest of the master header.

Change-Id: Ib083fbbf6194cd9a161d669f860aaf32fd96d9d4
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-03 17:59:39 +02:00
Oswald Buddenhagen
f4e5290709 remove pointless quoting of MODULE_*INCLUDES assignments
it would only cause trouble further down the line.

Change-Id: Ied9ba8a1ecf36b77e1091c73564bd7601ea6a6b4
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-03 17:59:35 +02:00
Oswald Buddenhagen
5d8b8eed90 move module version header generation back to syncqt
there is no particular reason for it being done by qmake.
avoids that the logic is distributed over two source files,
and allows us to generate these headers at pre-build time already,
including not forwarding to a yet unexisting file (which would have a
yet unknown location).

Change-Id: I9c78ab425cf6f01d076c86fd1ee602626f231487
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-03 17:59:25 +02:00
Eskil Abrahamsen Blomfeldt
681da4feb3 Android: Fix Windows build with recent SDK
Since the dx tool has moved in the SDK, we need to update our copy
of it to also search in the new location for dx.jar.

Task-number: QTBUG-31405
Change-Id: If093a9f51f33c5d8666919f516a3b336322a7169
Reviewed-by: Ray Donnelly <mingw.android@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2013-05-31 11:43:37 +02:00
Eskil Abrahamsen Blomfeldt
680b6b2192 Android: Compile jar file on Windows
Due to the way the DEX_CMD is formatted on Windows this would break
every time. Since we actually bundle dx.bat in the repository, there's
no need to check for its existence, so the easy fix is just to move
the existence check into the code path where it's run from the SDK.

Task-number: QTBUG-31405
Change-Id: If1aeb744d3abbd2488153b13aac401436965074e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Ray Donnelly <mingw.android@gmail.com>
2013-05-28 19:56:44 +02:00
Oswald Buddenhagen
8ea19caacf add -compile-examples configure option
this overrides the magic that makes examples only install their sources
in production builds.

packagers may want to force the build of the examples, so they can
package them up for demo purposes.
this is actually why we formerly had the split between demos and
examples ...

Task-number: QTBUG-30788
Change-Id: I5633f69404c5aa6846f5496e8f161a273a7a7da3
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-05-26 10:09:58 +02:00
Christian Strømme
77c0216369 Android: Added the attribute "extends".
Enables us to detect if a library should be added as a dependency or not.
E.g., libQt5MultimediaQuick_p should only be added as a dependency if an
application is using both QtMultimedia _and_ QtQuick.

Task-number: QTBUG-30861
Change-Id: Id62642c40e2ecca7149d249f65c7b0c950898374
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-05-22 23:31:46 +02:00
Eskil Abrahamsen Blomfeldt
2cde2fca6f Fix Qt for Android build with recent SDK bundle
In the recent revisions of the Android SDK bundle, the dx
tool has moved from platform-tools/ and into
build-tools/<revision-number> where revision-number is 17.0.0 at
the moment. To enable building on these SDKs, we add
detection for the dx tool and an environment variable which
can be set to override the revision number to provide a way
to build it against future revisions as well.

Task-number: QTBUG-31199
Change-Id: I0d6a22163dc2e50f7a81cd3fe8f3d53c6335aaee
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2013-05-21 15:24:13 +02:00
Stephen Kelly
c2f2c8a4e7 Check that files we expect to find actually exist when using a cmake package.
Change-Id: If7c724daa85df5e29e410b8deb4e69beb43ee8ea
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-05-20 15:20:26 +02:00
Ray Donnelly
f1d1b8219c MSYS: use cp -f for QMAKE_INSTALL_*
... in mingw-using specs because msysgit
doesn't provide install.exe and Windows
doesn't care about Unix permissions anyway.

Task-number: QTBUG-31147

Change-Id: Ic8032ca1a970ef41381852b6c5c372b805a124f1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-05-20 10:06:04 +02:00
Stephen Kelly
b911e058fa Only generate entries for private include dirs if they exist.
Change-Id: I1d745adfbae371f8f1f76e954be98f4c2fd962e0
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-05-14 18:12:20 +02:00
Oswald Buddenhagen
2b3055f7dc remove qtPrepareTool()'s ability to run batch files
it was only meant to automatically support syncqt.bat, which is gone
now.

fwiw, invoking batch files from within msys Makefiles was broken to
start with, as sh cannot directly run them.

Change-Id: I435568c578ce79e46f4e230e985ca9a04b34ffff
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-05-13 21:54:55 +02:00
Oswald Buddenhagen
2c033e00d4 remove pointless extension check from qtPrepareTool()
we never call it with an explicit extension, so this only complicates
matters.

Change-Id: Ib15180130359bb9575bf5dda564f8b817431618f
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-05-13 21:54:52 +02:00
Oswald Buddenhagen
8a78225a33 make qtPrepareTool recognize perl scripts by extension
this makes it possible to directly execute perl scripts on windows.

Change-Id: Ibbb90d46518ea8ac4f695d07141700630b33fab3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-05-13 21:54:46 +02:00
Oswald Buddenhagen
8739487b1c install host libraries into -hostprefix
... and introduce -hostlibdir configure option for symmetry.

the libraries built for the host have no business in the target prefix.

in principle this code would even support dynamically linked host
libraries, but that's currently unused.

Task-number: QTBUG-30591
Change-Id: I8e600fa4911a020fb0e87fbf7ef2f35647c7c4d5
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Ivan Romanov <drizt@land.ru>
2013-05-13 21:54:40 +02:00
Tor Arne Vestbø
1308aa25fb Cache Xcode and SDK settings in .qmake.cache if it exists
The Xcode and SDK settings are expensive to resolve, as we're using
system() calls to resolve them. We now try to detect the presence of
a .qmake.cache file (and inform the user that creating one would be
a good idea), and use the file to cache the various settings after
resolving them.

The Xcode logic had to be moved form xcode.conf as part of the mkspec,
into default_pre/post.prf, so that we could cache() the resolved values.

Task-number: QTBUG-30586
Change-Id: Ib5368cfee6f7e4a4a33f6be70d0e20d96896fe56
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-05-08 14:07:41 +02:00
Stephen Kelly
3483336889 Only expect EGL libraries in the cmake files if Qt is configured to use it.
Change-Id: Ida382a80dba882bbeb920756adc0c16321efe37e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-05-07 22:43:14 +02:00
Joerg Bornemann
b378d8ca10 set QMAKE_PLATFORM in win32-msvc2012
Change-Id: I3f43ece757b6f483fde256dbcc00f72b4e71c33e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-05-07 15:03:03 +02:00
Joerg Bornemann
ca354843c8 qmake/vcxproj: add WIN64 macro for x86_46 builds
The compiler defines _WIN32 for x86 builds.
The compiler defines _WIN32 and _WIN64 for x86_64 builds.

For consistency, the same should happen to the user defined macros
without underscore. The WIN32 macro is added in the win32-* mkspecs.

Task-number: QTBUG-30223

Change-Id: I342afed731f4ba253a2708b98f575039a04613d7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-05-07 15:02:59 +02:00
Joerg Bornemann
267dc53ea7 fix _WIN32 compiler defines for MSVC
The compiler defines _WIN32, not WIN32.

Change-Id: I359a188b4ef145b7b78c35c5b72a804200b76507
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-05-07 15:02:55 +02:00