Commit Graph

38 Commits

Author SHA1 Message Date
Oswald Buddenhagen
43af0260b8 fix -rpath-link handling for non-installed prefix builds
forwarding module pris get rpath_link{,_private} fields, which are
used accordingly by qtAddModule().

Change-Id: I0abc2dc8b1e8744dbf7f439aa7fed9ae159c2c74
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-11 10:40:16 +02:00
Oswald Buddenhagen
0fc4f2b4cf qtAddModule(): put search paths directly into LIBS{,_PRIVATE}
QMAKE_LIBDIR and QMAKE_FRAMEWORKPATH have the downside that they
always effectively end up in LIBS, which makes for weird prl files.

Change-Id: Iaf61b0038504ff91ae5ec7f9b1255fe3a2d134f1
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-08-11 00:41:07 +02:00
Oswald Buddenhagen
6f4ff81380 assemble the complete tool commands already in qt_tool.prf
this saves some repeated calculations. also, it's nicer to have most
logic in one place.

Change-Id: Iea362d40f5e6203709ced94d29ca61a4163b8e69
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-08-11 00:41:07 +02:00
Oswald Buddenhagen
ff13798708 fix error message about bad qt modules
the variable name is a function parameter now

Change-Id: I46f3ce37c157312e7f70291a0cef2d666d50664c
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-08-11 00:41:07 +02:00
Oswald Buddenhagen
3cc151d0c2 adjust qtAddLibrary() to new qtAddModule() parameters
Change-Id: Ib5918fa83e78d16fd318590c33b280d9054b2cd6
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-08-08 12:04:49 +02:00
Oswald Buddenhagen
3dfb362782 add support for QT_PRIVATE
this is handled the same way as the QT variable, only that the actual
libraries end up in LIBS_PRIVATE, not LIBS, which means they don't end up
in prl files.

the handling of the two variables is entirely independent, including
independent dependency resolution, so some libraries will typically end
up twice on the linker command line. this is not a problem.

Change-Id: I257ad0d414bf273c08a7bd6a874fe9ddb7356009
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-08-07 16:40:07 +02:00
Oswald Buddenhagen
b7db596590 use QMAKE_LIBDIR for passing LSB library path
-L in QMAKE_LFLAGS is just wrong

Change-Id: I05eae0bb5e5e3dc8f8234616cb2ccdfba1d517fb
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-08-04 08:15:46 +02:00
Oswald Buddenhagen
e07372ff50 fix host vs. makefile directory separator mess
the system path separator and shell are bound to the host system
(system() will use cmd even on mingw with sh.exe in path).
the makefiles otoh may depend on what the qmakespec defines.

consequently, add $$system_path() and $$system_quote() (for use with
system() & $$system()). $$native_path() is renamed to $$shell_path() and
should be used with $$shell_quote() to produce command lines in
makefiles.
$$QMAKE_DIR_SEP needs to be applied to Option::dir_sep right after
parsing the spec, so it is available to $$shell_{path,quote}().

Change-Id: If3db4849e7f96068cf03a32348a24f3a72d6292c
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2012-07-28 00:09:45 +02:00
Oswald Buddenhagen
079a87fec1 make the prl lookup search in standard locations
qtAddModule() skips adding standard library paths to LIBS. however, as
processPrlFiles() didn't know anything about that, it would not find the
prl files of qt libraries in these paths.
so centralize the definition of these default paths (we should actually
ask the linker for them) and use it in both places.
do the same for the include paths for symmetry.

Change-Id: I7e3692dc2d1c2d0c97a9151d15887b1263de137a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-07-12 10:40:50 +02:00
Oswald Buddenhagen
a15d674406 fix linking against installations in /usr/lib
Change-Id: I17a6a2e058f039e525461d459477329fd7090417
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-07-10 23:06:25 +02:00
Oswald Buddenhagen
48b01da4d3 deal with %PATH% containing parentheses
we need to make cmd escape the expanded output, so it doesn't confuse
its own command line parsing (which happens later!).

Change-Id: I0c2c71d276c0aebe3c2163f7f08db8050a14d7ce
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-07-09 15:14:44 +02:00
Oswald Buddenhagen
8d2c59774d make non-bootstrapped non-installed prefix-built executables runnable
tools like idc and lrelease are outside qtbase/bin and depend on libraries
which are not in any search path, so we need some way to let the modules
announce the locations (qt_tool.prf) and use it (in qtPrepareTool()).

Change-Id: I98d5109cbee5e745d86dde94e3dc791d42edc3ec
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-07-05 21:11:08 +02:00
Iikka Eklund
400813f585 Fix FRAMEWORK_INCLUDE for Mac
On Mac the framework include paths were generated wrong.
The $${MODULE_NAME} was missing.
This patch fixes the framework include path generation.

Change-Id: Ic0e8d69ac7ac63be755302dc822c28240c9bc3d2
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-07-05 13:13:58 +02:00
Oswald Buddenhagen
34cb86d46b make using testlib automatically "promote" all modules to -private
autotests often need private headers (especially with qpa headers now
being private) and have no compatibility requirements, so it makes sense
to just use the privates of requested modules.

this also suppresses the useless warning about using privates, in case
they are still explicitly specified.

Change-Id: I9e499bedcf6ef25777283ff1432cef7254e9093a
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-06-26 11:51:34 +02:00
Oswald Buddenhagen
eae5135808 remove detection-based usage of modules which are frameworks
each qt module comes properly declared and located, so there is simply
no point in performing a search.

Change-Id: I86fad21bb8e128b85f1000cc116cc44a23642eb4
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:46:01 +02:00
Oswald Buddenhagen
a0374fd490 fix direct includes from modules which are frameworks
Change-Id: I1f2c1e5ebdb2fa258500a08b32dcafb4150ee424
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:46:01 +02:00
Oswald Buddenhagen
4816ca6c56 always add library path from module
that way we can theoretically support modules outside $QTDIR.
also, it's just cleaner.

Change-Id: I6139ebc7328b64ace8552b3e54f9a8c69248ceec
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:45:58 +02:00
Oswald Buddenhagen
5d1b4c79d2 make module includepath addition less convoluted
don't prepend the paths, as this will only mess up building of
subsequent modules (e.g., building qtdeclarative against an installed
qtbase would pick up the headers from the qtdeclarative previously
installed into the same directory as qtbase).
for frameworks this was a rather pointless exercise in the first place,
as their headers are properly isolated anyway.

however, make sure that we don't add system locations to the search
paths, as this is a) unnecessary and b) messes up subsequent libraries
in non-standard locations which want to shadow versions in standard
locations (pkg-config .pc files which add standard paths are considered
broken as well).

Change-Id: Ie1dc65d4767e98e1df6e49012505141935a6c704
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:45:58 +02:00
Oswald Buddenhagen
84fb7be6c1 make qtAddLibrary() a noisy compat wrapper for qtAddModule()
it's used by people (in particular, qt creator), so it would be not nice
to just delete it entirely.

Change-Id: I6bd849d00ebfe3b9b126e01a6d1c6e7c6584d8ac
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:39:59 +02:00
Oswald Buddenhagen
8b822825c5 make use of $$[FOO/get] properties
this cleans up a lot of hacks supporting the build of qt, including the
last bits of $QTDIR.

Change-Id: Id119886ed8097967dad6cf86ebd4e71d90c42841
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-19 16:39:58 +02:00
Bai Jing
de37821c56 let qtPrepareTool give right path for app_bundle
Change-Id: Ieb4979244d741c9d9d0c11a035c18ced87ea28f5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-26 14:06:51 +02:00
Sean Harmer
75218e08ab Do not add -rpath-link directives with no library path
Doing so works fine on Linux as g++ version there silently ignores
this. However, the qcc toolchain for QNX barfs.

Change-Id: Ia236910adc09dc1653e4169e20476b69c2de62ab
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-03-12 17:33:15 +01:00
Oswald Buddenhagen
adfcd98922 replace uses of QMAKE_INCDIR_QT and QMAKE_LIBDIR_QT with module-specific variables
Change-Id: Id410887fa97f345a229e0cbf395633ccf303fa2f
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-03-08 18:57:56 +01:00
Oswald Buddenhagen
012f799254 revamp -sysroot and -hostprefix handling
instead of being a variable added to the makespec (via qconfig.pri),
QT_SYSROOT is now a property.

the QT_INSTALL_... properties are now automatically prefixed with the
sysroot; the raw values are available as QT_RAW_INSTALL_... - this is
expected to cause the least migration effort for existing projects.

-hostprefix and the new -hostbindir & -hostdatadir now feed the new
QT_HOST_... properties.

adapted the qmake feature files and the qtbase build system accordingly.

Change-Id: Iaa9b65bc10d9fe9c4988d620c70a8ce72177f8d4
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-03-01 23:18:23 +01:00
Rohan McGovern
7e66f6c207 Set QMAKE_*_VERSION_OVERRIDE for all modules.
On Windows, qmake searches for and uses the highest numbered available
version of each requested library, or a version with no number if no
libraries were found.  This meant that qmaking a library's consumer
before qmaking the library itself could result in the consumer
incorrectly attempting to link against $${LIB}.lib rather than the
correct $${LIB}5.lib (for example).

QMAKE_$${LIB}_VERSION_OVERRIDE is the way to work around this.

Previously, a hardcoded list of libraries had version overrides set up
on Windows, but the qmake order issue affects all libraries, not just
these.  Therefore, handle it for all modules.

Change-Id: I83b4646e3819f525193d1fc065b0d0e65b3be99f
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2011-12-07 12:55:28 +01:00
Kent Hansen
502b5b8178 Make v8 snapshots work in debug-and-release mode
Debug snapshots and release snapshots aren't compatible. Both a
debug version and release version of the mkv8snapshot tool must be
built, and the corresponding executable selected when building v8.

Adopt the library naming convention for naming the mkv8snapshot
executable ("mkv8snapshot" in release, "mkv8snapshot_debug" in debug
on Mac, "mkv8snapshotd" in debug on Windows).

Change-Id: I7a94b09e7db7ed8bbaa293637c092a1d1d1dbaba
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2011-11-24 16:46:15 +01:00
Joerg Bornemann
981dd3b314 qmake: remove symbian support
Change-Id: I1db834500921681676a6f46e7750bdd81bf0093d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2011-11-07 13:26:41 +01:00
Harald Fernengel
a0d1b99609 Make pkg-config cross-compile aware
Introduce PKG_CONFIG_SYSROOT_DIR and PKG_CONFIG_LIBDIR for
cross-compilation environments

Change-Id: I859d55f125b18d6bdef0f1dfaeb43721b85d22f5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2011-10-19 22:27:09 +02:00
Rohan McGovern
81a5885814 Mac: fix linking with Qt frameworks which don't exist at qmake time
This restores the forced-vs-detection logic for Qt frameworks which
was removed by commit ceed409b40.

The problem of linking against Qt modules compiled as a static
library is solved a different way: the module must explicitly state
in the module .pri file that it is built as a static lib.

Change-Id: Ie3d726f7b3933e5b5d27f15c6112ec1c7dee1ea2
Reviewed-on: http://codereview.qt-project.org/5034
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2011-09-17 01:32:51 +02:00
Morten Sorvig
ceed409b40 Mac: make platformsupport a static lib
The "force framework/no-framework" logic does not
really work, since Qt is now a mix of frameworks
and statics libs. Remove this code path and use
the "detection" path instead.

Also remove the exports from platformsupport.

Change-Id: I0a308666480445eb47c4f443ff7529addecad10d
Reviewed-on: http://codereview.qt.nokia.com/3464
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2011-09-01 13:04:11 +02:00
Marius Storm-Olsen
f3f5dc6346 Fix non-installed library detection
Change-Id: I1eb8337bebb524b9f02aef63cd42efcb4a9211bc
Reviewed-on: http://codereview.qt.nokia.com/1759
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2011-07-21 20:40:51 +02:00
Liang Qi
8c680aceaa Support -debug build on Mac
-Wl,-rpath-link is expected to work for all gcc except mac.

Change-Id: I4b57e0088db49a8e35840d981e5d6edbb1012396
Reviewed-on: http://codereview.qt.nokia.com/506
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-06-20 18:15:38 +02:00
Marius Storm-Olsen
1287361f64 Move private headers into versioned subdirectory
This will allow us to expose private headers in a controlled manner,
and ensure that they are not used by accident. This also means that
we internally will have to enable the private headers for the
modules we wish to use in the project.
2011-05-02 15:30:08 +02:00
Prasanth Ullattil
b88c6fbcfe Use the MODULE_LIBS instead of QMAKE_LIBDIR_QT for frameworks. 2011-04-27 12:05:55 +02:00
axis
a93039b229 Fixed a bug in libdir handling.
We need to use QMAKE_LIBDIR instead of QMAKE_LFLAGS and -L, because
MSVC does not understand -L.
2011-04-27 12:05:54 +02:00
Marius Storm-Olsen
82bf3bd775 Make each module refer to its own bin/
Since modules cannot rely on QtCore having a build directory, nor
can they build the applications directly into $$[QT_INSTALL_BINS]
each module needs their own bin/. Add this path to each module's
pri file, so others can use their applications
2011-04-27 12:05:51 +02:00
Marius Storm-Olsen
78797cc7e9 Make qt.prf use new qt_module.pri structure for QT variable
This change requires the new resolve_depends(var, prefix) function in qmake.
2011-04-27 12:05:46 +02:00
Qt by Nokia
38be0d1383 Initial import from the monolithic Qt.
This is the beginning of revision history for this module. If you
want to look at revision history older than this, please refer to the
Qt Git wiki for how to use Git history grafting. At the time of
writing, this wiki is located here:

http://qt.gitorious.org/qt/pages/GitIntroductionWithQt

If you have already performed the grafting and you don't see any
history beyond this commit, try running "git log" with the "--follow"
argument.

Branched from the monolithic repo, Qt master branch, at commit
896db169ea224deb96c59ce8af800d019de63f12
2011-04-27 12:05:43 +02:00