Commit Graph

421 Commits

Author SHA1 Message Date
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
9d1f44b9ce make sure that building tests implies building other parts
some tests have runtime deps on the other parts

Change-Id: Ieb2925e762e94b3c0b16884be0f59e10ce8e4878
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-07-10 22:44:30 +02:00
Thomas Senyk
84792b5ad5 Adding iMX6-device-files
Change-Id: Ifdfacf7201c9ee47783ae782d1f9042fe529a039
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-07-10 03:23:39 +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
Rohan McGovern
d815043b11 qt_parts.prf: fixed handling of demos
Subdir for demos/demos.pro is 'demos', not 'examples'.

Change-Id: Ic4d80501e5d910891b0436ecd9881b79a4a99090
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-07-06 13:58:05 +02:00
Rohan McGovern
e17c87df9c qt_parts.prf: fixed examples, tests, tools always disabled
exists() resolves the path relative to qmake's current working
directory, which is mkspecs/features.  Explicitly refer to the full
path.

Change-Id: I04e9f377528bffc1ebeeed69c86d73b85a117423
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
2012-07-06 01:41:53 +02:00
Oswald Buddenhagen
918fd56324 centralize handling of QT_BUILD_PARTS
Change-Id: I33b8c3958a102d87461ad887fa5749bd9a6dc037
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-07-05 21:11:27 +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
Oswald Buddenhagen
9c3b83437a set DLLDESTDIR only for non-prefix builds
a prefix build needs to be installed first anyway

Change-Id: I798861fddad2be289e9e4f182d0373e389b57437
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-07-05 21:10:52 +02:00
Oswald Buddenhagen
5863103385 set DLLDESTDIR to the build dir, not the install dir
Change-Id: I0aa3b512e5d633c5628c4bb285f96a41cda858d9
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-07-05 21:10:45 +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
Stephen Kelly
5c5eb92419 Skip (re-)creation of cmake files during build passes.
Change-Id: I03973220c17c065bc6ea391300b677e27f48a46f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-07-04 15:52:06 +02:00
Stephen Kelly
6bd4be9436 Uppercase the CONFIG for verbatim mode.
Change-Id: Iec883e0218af80fc329d866affb2b95db72c54d3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-07-04 15:52:00 +02:00
Stephen Kelly
e3a9ac4f36 Set the language of a STATIC library.
This is used as a hint for the linker.

Change-Id: I869039c1ea50f1926809ead4064317628ebbb2e7
Reviewed-by: Clinton Stimpson <clinton@elemtech.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-07-04 15:51:36 +02:00
Rohan McGovern
bcf20e122a Avoid load(testcase) for installing test helper apps
Make test projects declare TEST_HELPER_INSTALLS rather than calling a
function exported by testcase.prf.  load(testcase) may be unsafe, as
testcase.prf should be processed after default_post.prf.

Fixes silent disabling of various autotests.

Change-Id: I56b35ffd653a637ad5ab18d64dd1a1edadfac59f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Kurt Korbatits  <kurt.korbatits@nokia.com>
2012-07-04 02:46:27 +02:00
Stephen Kelly
acf9220374 Use qmake dirname function correctly.
It takes a variable name apparently.

Change-Id: I9e2e2a0f6f5c42ecf9d07e4ac45954f14676d559
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-07-03 14:54:52 +02:00
Marc Mutz
f4c9797d5b QNX: set QMAKE_CXXFLAGS_CXX11
Rationale:
  QCC is a wrapper around GCC, but it doesn't understand -std,
  so we need to pass it via -Wc.

  The underlying GCC is v4.4, which doesn't know -std=c++11
  yet, only c++0x.

  We can't use -std=c++0x here, because the QNX headers
  depend on some GNU extensions (nanosleep() was one that I
  saw), so it has to be gnu++0x, ie. STD C++ + GNU extensions.

Change-Id: Ia5caf68f558b1638224e4876f1bbec84a0a93f67
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2012-07-03 14:37:36 +02:00
Konstantin Ritt
d53f5db953 qmake: improve the .pc files generator
Don't hardcode the "qt_config" EXTRA variable and use QMAKE_PKGCONFIG_VARIABLES instead.
This allows qmake create the .pc files that are unrelated to Qt.

Change-Id: Ic72005e8819a15f6c50f3aaf79424a247fba20af
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-07-03 01:08:44 +02:00
Stephen Kelly
7327ae8c17 Look for CMake config files in the same prefixes as mkspecs.
This will allow tests of modules outside of qtbase to find their
CMake config files.

Change-Id: I68036908d0fd2ec640530b57d0f572d211ef44f0
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-07-03 01:08:18 +02:00
Stephen Kelly
a8ec5e912f Simplify logic for paths to CMake modules in tests.
Use a command line argument instead of an environment variable.

Change-Id: I518b21d1fb9567d182384885a308c76e108598d8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-07-03 01:08:13 +02:00
Robin Burchell
ab2fb14b46 android: remove QT_NO_QWS_TRANSFORMED from mkspecs
this does nothing anymore

Change-Id: If8798335dea935d1df9f085a7b4e1658f426809b
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-07-03 00:03:36 +02:00
Robin Burchell
43a22ee83e android: fix stupid thinko where cflags were set before the common include
this meant that the common mkspec was unable to do 'sensible' things with the
cflags (hence -Wno-psabi not being applied to C++ code), and probably explains a
lot of other weird things.

Change-Id: I77079027dc1b2691c53212893eb90c7b935d00a2
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-07-03 00:03:31 +02:00
Donald Carr
82ca0936ed Remove stale qws related mkspecs
Should be be reintroduced with intent if there is sufficient interest, outside of the QWS context.

Change-Id: I598f47b5cf0c10dd66534294d0f27cf0b4e5069a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-30 04:29:44 +02:00
Donald Carr
0bfa3569e2 Migrate linux-clang mkspec out of unsupported
Change-Id: I84abc4c305c28e46dd514d3fb78d27c051dc6048
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-30 04:29:40 +02:00
Mark Brand
f4f0c8b99b Merge "Merge branch 'buildsystem' (second round)" into refs/staging/master 2012-06-29 21:26:11 +02:00
Robin Burchell
ddf7233125 Add mkspecs for android cross compilation.
Using these requires setting two environment variables, e.g, for me:

export ANDROID_NDK_ROOT=/Users/burchr/android-ndk-r7c
export ANDROID_NDK_HOST=darwin-x86
./configure -opensource -confirm-license -xplatform unsupported/linux-android-armeabi-v7a-g++ -nomake examples -nomake demos -nomake tests -v

These mkspecs are somewhat based on the work of the Necessitas crew, kudos to
them for their work in getting the NDK integration into qmake.

Change-Id: I591e423ed8dc70616009f681c81890c696110e62
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-06-29 21:15:46 +02:00
Oswald Buddenhagen
1491065506 Merge branch 'buildsystem' (second round)
refactoring and cleanup. fixes x-builds between different os families.

Conflicts:
	mkspecs/features/qt.prf

Change-Id: I0205e6f07f77c9b015cf055dd87a471883949a91
2012-06-29 09:06:37 +02:00
Thiago Macieira
96166fa56a Update the macros for shared/DLL and static builds
Up until now, we had a mess of different macros used for building
DLLs, for building shared libraries on Unix systems and for building
static libraries. Some of the macros were contradictory and did not
work. From now on, there shall be only:

 - QT_STATIC: indicates that it's a static Qt build and the export
   macros should expand to empty
 - QT_SHARED: indicates that it's a shared / dynamic Qt build and the
   export macros should expand to Q_DECL_EXPORT or Q_DECL_IMPORT,
   depending on whether the macro corresponds to the current module
   being built (the QT_BUILD_XXXX_LIB macro comes from the module's
   .pro file)

QT_BOOTSTRAPPED implies QT_STATIC since the bootstrapped tools link
statically to some source code.

QT_STATIC is recorded in qconfig.h by configure when Qt is configured
for static builds. Nothing is recorded for a shared / dynamic build,
so QT_SHARED is implied if nothing is defined. This allows for the
existence of a static_and_shared build: with nothing recorded,
defining QT_STATIC before qglobal.h causes the export macros to be
that of the static form. Linking to the static libraries is out of the
scope of this change (something for the buildsystem and linker to
figure out).

From this commit on, the proper way of declaring the export macros for
a module called QtFoo is:

    #ifndef QT_STATIC
    #  ifdef QT_BUILD_FOO_LIB
    #    define Q_FOO_EXPORT Q_DECL_EXPORT
    #  else
    #    define Q_FOO_EXPORT Q_DECL_IMPORT
    #  endif
    #else
    #  define Q_FOO_EXPORT
    #endif

The type of the Qt build is recorded in QT_CONFIG (in qconfig.pri) so
all Qt modules build by default the same type of library. The keywords
are "static" and "shared", used in both QT_CONFIG and CONFIG. The
previous keyword of "staticlib" is deprecated and should not be used.

Discussed-on: http://lists.qt-project.org/pipermail/development/2012-April/003172.html
Change-Id: I127896607794795b681c98d08467efd8af49bcf3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-06-28 06:21:48 +02:00
Stephen Kelly
c4a05f5e3a Refactor the creation of imported targets into a macro.
This will make it easier to handle cases where the Qt installation
and the build do not match exactly. For example, on Windows, it
would be possible to do:

  ./configure -debug
  make
  make install
  make release
  make release_install

In which case, both debug and release libraries would be installed
even though it was only configured with -debug. On non-Windows, the
debug and release libraries would overwrite each other, so it is
not necessary to support it.

Similarly, we want to handle cases in the future where (on
non-Windows) both static and shared libraries would be
installed (again, not described with a single build configuration).

Change-Id: Ib7916c9664a0f72e40156a03bdfc79a4a6c24350
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-06-27 14:43:00 +02:00
Oswald Buddenhagen
a2382f7f15 unset QT_MODULE_* after loading the module pris
abuses have been observed in the wild, so make sure these variables are
not available.

Change-Id: I502c3f5db7d341cf6a8bd2ec09e87f129da2fca6
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-06-27 14:35:31 +02:00
Oswald Buddenhagen
b40b91cb39 move initialization of numerous variables to spec_pre.prf
this is cleaner by design and allows removing some hacks.

Change-Id: I3270195b5d62caa476ffde7c1e1ef43cec99c565
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-06-27 14:35:25 +02:00
Oswald Buddenhagen
dafc4a884c don't put QMAKESPEC_ORIGINAL into INCLUDEPATH any more
the spec does that itself, given that the real spec is just included
nowadays, instead of copied (which never worked without side effects).

Change-Id: Ibf655b9a943dadb949d3c7a58d8fe50fcd62cef7
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-27 14:35:24 +02:00
Oswald Buddenhagen
caa2263051 use real qmakespec as basis for finding features
doesn't make much of a difference on unix (as the default specs are just
symlinks).
on windows, it makes the gross hack used for finding spec-specific wince
default_post.prfs unnecessary.

Change-Id: Id403dce5be487e1ae22c1f54b8095a6afdd98bc8
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-06-27 09:39:51 +02:00
Oswald Buddenhagen
4753958db7 revamp handling of qmake target mode
the project evaluator becomes oblivious of the target mode.
the mode is set up in spec_post.prf according to the spec.
$$QMAKE_TARGET contains the feature suffixes to search, and is also
contained in $$CONFIG.
the target_mode variable itself becomes private to the Makefile class.

Change-Id: I3c06d9dab536b753343cec6c5c491d3203e50bd8
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-06-27 09:39:50 +02:00
Holger Hans Peter Freyther
8e5b6647a9 mkspecs: Use the right variable name to find the qdevice.pri
Commit 8b822825c5 introduced the
/get version but used the wrong variable name. Fix it by using
QT_HOST_DATA.

Change-Id: Ia4759b8c6ff2de9726f3aebae2f2f39c6644d4ec
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-26 20:02:55 +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
Stephen Kelly
c42a0a7729 Factorize the cmake test infrastructure to be reusable.
This makes it easy to add cmake module tests for all modules.

Change-Id: I303bf7674ca6ae7a8544488f96e8e02afbaa6ff0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-06-26 11:49:52 +02:00
Konstantin Ritt
a9ba927406 Avoid macro re-definition after 1838a6c2fb
Change-Id: I2631ff687881278ba42edacd237a2130c103b69f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2012-06-26 11:37:57 +02:00
Stephen Kelly
fa6ca58b8b Don't re-evaluate the lib location.
Rely on the DESTDIR variable being set correctly by qt_module_config.

Change-Id: I1a166124024722ec5a189a7402b38646179aa890
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-26 04:18:29 +02:00
Stephen Kelly
70c981f973 Fix the DEFINITIONS for Qt modules.
As the DEFINITIONS to be used for QtAddOns is different to essential
modules, rely on the logic in qt_module_config setting this variable
correctly.

Change-Id: I64485ccd6df093216cac4a97fb1cfaac0122a218
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-26 04:18:25 +02:00
Oswald Buddenhagen
d921182310 add possibility to set $$MODULE_IMPORT_SUFFIX in module .pri files
quick1 got a suffix, so we need a way to set it

Change-Id: I099b868106abd4d3040047703472faa65f694f31
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-06-24 15:26:34 +02:00
Donald Carr
e6ccfe40eb Set Wayland as default platform on Raspberry-Pi
Update Raspberry-Pi mkspec to indicate that wayland is the default platform
for the Raspberry-Pi.

Change-Id: I10b30ecfb16faed6027137225d9e95409faa7e87
Reviewed-by: Johannes Zellner <johannes.zellner@nokia.com>
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
2012-06-24 05:26:10 +02:00
Stephen Kelly
3d2a8d09d1 Add a variable for the private includes for modules.
This is required to use QPA for example in 5.0.

Change-Id: I44bfc6987d778370e55c05c591f63ff84c482d0a
Reviewed-by: David Faure <faure@kde.org>
2012-06-23 14:16:24 +02:00
Girish Ramakrishnan
7042de0894 eglfs: move m_pos into Cursor
Change-Id: I51e92d265e7ea6372ae58b357f75362e2d9a2df9
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-06-22 15:42:44 +02:00
Girish Ramakrishnan
57ca02b1d2 embedded doesn't exist anymore
Change-Id: Ib56895defb72f51bb790994b9fd72fc81ef25af5
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-06-22 07:41:31 +02:00
Bradley T. Hughes
1618ef236b mkspecs: Add macx-clang-libc++ and macx-clang-libc++-32
Use these mkspecs to switch to the new libc++ C++ runtime library, which
in turn makes it possible to enable C++11 support with clang.

Change-Id: If92908592f8bee4829a1bad747fe396f527d26c7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-06-20 15:45:07 +02:00
Oswald Buddenhagen
2f1762535b make missing qt modules fatal
there is no point in continuing; it will error out later (in more
cryptic ways) anyway.

Change-Id: I2562eadc2d91bfaa6e85368dc3774da31409a141
2012-06-19 16:46:09 +02:00
Oswald Buddenhagen
0fdf7c3a43 less confusing wording
Change-Id: Ia509fe1a28de803673623d425f5949b35404598c
2012-06-19 16:46:09 +02:00
Oswald Buddenhagen
1ee462604b fix misnomer: qt_module.prf => qt_build_config.prf
qt_module suggests to be congruent to qt_plugin.

Change-Id: I629530bcbe2ba6c0adbdc11a275119c8aff0c953
2012-06-19 16:46:08 +02:00
Oswald Buddenhagen
b3a497d781 fix regexp in qmodule.pri inclusion check
this also allows us removing the redundant flag variable

Change-Id: If26d22280ce7bc2ef3514c7c11ce7cd9baec1293
2012-06-19 16:46:08 +02:00