Commit Graph

448 Commits

Author SHA1 Message Date
Morten Johan Sørvig
c6a689f64f Make .prl file generation work for iOS again.
d28073d9 creates a distinction between "mac" and
"macx". The latter is not set on iOS, which caused
MakefileGenerator::target_mode to be set to TARG_UNIX_MODE.

Check for the "mac" active config instead of "macx".
Rename TARG_MACX_MODE -> TARG_MAC_MODE.

Change-Id: I7192788c33f5723034ba76da2492379dd454f0ab
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-03-06 19:03:21 +01:00
Frederik Gladhorn
49a2ec05b4 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/plugins/platforms/qnx/qqnxscreen.cpp
	src/plugins/platforms/windows/qwindowsdialoghelpers.cpp

Change-Id: Ib64f21c077b54f2291d19187590bfe869b98477a
2013-03-06 14:38:07 +01:00
Frederik Gladhorn
5e8ae03578 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	configure
	qmake/generators/mac/pbuilder_pbx.cpp
	src/corelib/kernel/qtimerinfo_unix.cpp
	src/plugins/platforms/cocoa/qcocoabackingstore.mm
	src/plugins/platforms/cocoa/qcocoawindow.mm
	src/plugins/platforms/windows/qwindowswindow.cpp
	src/plugins/platforms/xcb/qglxintegration.cpp

Change-Id: I8d125fe498f5304874e6976b53f588d3e98a66ac
2013-03-05 13:42:11 +01:00
Oswald Buddenhagen
1c061b4bcc introduce QMAKE_LINK_O_FLAG
this makes it possible to properly parametrize alternative linkers.

Change-Id: Ia9cf574544a0259975470366d278b6c5dc747906
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-03-02 10:45:54 +01:00
Joerg Bornemann
ebc4fb452a define NDEBUG in MSVC/nmake release builds
Some headers, like assert.h, check for the presence of NDEBUG.
We already define NDEBUG for MSVC/vcproj release builds.

Task-number: QTBUG-3389

Change-Id: I3b1510d47ff80611aa8072e66492ff2d648393eb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-01 13:05:11 +01:00
Frederik Gladhorn
21255d65ef Merge "Merge remote-tracking branch 'origin/release' into stable" into refs/staging/stable 2013-03-01 11:07:19 +01:00
Joerg Bornemann
dbe74582a6 remove unused member Option::application_argv0
Use QMakeGlobals::qmake_abslocation instead.

Change-Id: I1d0f39549b477ede674730937d879c492407fb28
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-01 11:07:19 +01:00
Tor Arne Vestbø
a6286039ba iOS: Write default code signing identify for iOS in Xcode generator
Change-Id: Ic04da6063863585665c9133caba0279ba478fbb4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Ian Dean <ian@mediator-software.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-02-27 13:07:23 +01:00
Andy Shaw
4a6a066df2 Fix generation of XCode projects for XCode 4.6
When a framework is referenced in the XCode project then it is known as
a framework by the lastKnownFileType and not the reference type. This
ensures it works in both XCode 3 and XCode 4.

Task-number: QTBUG-29371
Change-Id: I434246a46d6c5bfd50ba7de1a7c710c0caf0bc0a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-02-27 12:01:28 +01:00
Tor Arne Vestbø
de5553aad5 qmake: Resolve QMAKE_INFO_PLIST against current working dir
We're not in the output directory yet, so resolving using vanilla
fileFixify will end up failing when we check if the file exists, since
QFileInfo resolves relative paths against the current directory.

Change-Id: I414c6a2e83b49e3fb30e6153a49f7a90a8e528a0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-02-26 13:13:24 +01:00
Tor Arne Vestbø
dd5b437d6a qmake: Fix file paths in Xcode projects when shadow-building
The Xcode generator seems to have been written with the assumption that
writeMakeParts() would be called with the output directory as the current
directory, but that's not the case when shadow-building. Perhaps this
was changed in qmake at some point, and the Xcode generator was not
updated to reflect that.

Instead of replacing every occurance of fileFixify and other logic to
deal with paths, we just chdir into the output_dir for the duration
of the function (except when writing the 'make qmake' makefile, as
the regular makefile generator works as expected with the current
directory set to the input directory).

Change-Id: I6ba492036d73f29f4adbd7cd554db9504050629e
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-02-26 13:13:24 +01:00
Tor Arne Vestbø
f6d13a45c8 qmake: Prevent Obj-C sources from building both as extra compiler and in Xcode
We already assume that if a source is buildable and should end up in OBJECTS we
can let Xcode build it, so we skip this input for the extra compiler.

Change-Id: I17b2408925b8e6513f0fa0d2459ec539bf7381d3
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-02-26 13:13:23 +01:00
Tor Arne Vestbø
0e548b5856 qmake: Use PBXResourcesBuildPhase for QMAKE_BUNDLE_DATA without a path
The PBXResourcesBuildPhase will optimize resources, such as turning XIB
files into NIB files, running pngcrush on images, turning string files
into binary plists, etc, so we prefer that if possible.

Unfortunatly this phase does not support custom paths, so whenever we
encounter bundle data with a custom path we fall back to the regular
PBXCopyFilesBuildPhase.

Change-Id: I539db03dd7982fd37293123b6428cdb695f64d2b
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-02-26 13:13:23 +01:00
Tor Arne Vestbø
3cc738dfc7 qmake: Don't treat .xcodeproj directories as OUT_PWD when passed with -o
The Xcode generator creates a makefile for running 'make qmake', and the
makefile passes -o to ensure it writes to the same Xcode project. This
fails when qmake then treats -o foo.xcodeproj/project.xcproj as not only
setting the output filename, but also the output directory to foo.xcodeproj,
which results in the Xcode project trying to reference files relative
to this directory, such as '../main.cpp'.

Unfortunatly the output filename parsing happens too early for us to know
whether or not the generator is Xcode, so we just have to assume that
a certain combination of output filename and directories means we are
generating an Xcode project.

Change-Id: I0901d4db995f287c35cbbbd015683d5abda6d0f5
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-02-26 13:13:17 +01:00
Tor Arne Vestbø
883efa10cd qmake: Prevent duplicate libaries from being added to the link phase
Change-Id: I5ec7acb8f060e9d9bbd8cdb95d40ace03cffe9c7
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-02-26 13:12:25 +01:00
Tor Arne Vestbø
c6eae1acf8 qmake: Don't generate Xcode project bundle identifiers with spaces
Replace them with dashes, like Xcode itself does.

Change-Id: I302425363a2eef13394025cd4a9e414048ce55ce
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-02-26 13:11:19 +01:00
Tor Arne Vestbø
66f6e5b162 qmake: Update Xcode generator to produce project files similar to Xcode
There was quite a bit of cruft left over from older Xcode version. We
now produce Xcode 3.2 compatible files, similar to what Xcode would do
when asked to upgrade one of our generated files. In particular:

 - Removed refType
 - Set more lastKnownFileTypes
 - Renamed defaultConfigurationIsName to defaultConfigurationName
 - Add runOnlyForDeploymentPostprocessing = 0 to build phases
 - Don't put buildSettings directly into PBXNativeTarget
 - Don't write productSettingsXML
 - Don't write startupPath
 - Don't write name when path is the exact same
 - Write empty buildSetting lists as empty string
 - Don't write empty PBXBuildFile settings
 - Don't write generated/neede filenames for PBXShellScriptBuildPhase
 - Use PBXFileReference instad of PBXFrameworkReference
 - Prune deprecated buildSetting variables
 - Remove deprecated PBXBuildStyle sections
 - Resolve correct CC/CPLUSPLUS/LDPLUSPLUS
 - Write IPHONEOS_DEPLOYMENT_TARGET

Change-Id: Ia2365c2623fe898878bd10636c3b85145c1cff04
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2013-02-26 13:11:11 +01:00
Tor Arne Vestbø
e70e81d554 Xcode: Change groups/build phase wording to match Apple's templates
Change-Id: I286965a05750bc77b94ca4d3b76364b0130e32ed
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2013-02-22 23:56:37 +01:00
Tor Arne Vestbø
a36eaae893 Xcode: Merge various sources and extra-compilers into more managable groups
Instead of letting each qmake variable have its own auto-generated name
we try to group common variables into similar groups as used by the Xcode
templates provided by Apple.

We also prevent the same files from ending up multiple times in a group.

Change-Id: I73b13d6071bb7b3cd1501c422a99c60743221485
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2013-02-22 23:56:37 +01:00
Matt Fischer
fcef9b4252 Fix generated pkg-config files when cross-compiling
The Libs: line of the pkg-config files is constructed
by taking the name of the .pc file itself, and stripping
off the path and extension.  However, the code which does
this does not handle path separators correctly when the
target OS and local OS are different.  To get around this,
the custom string manipulation was replaced with a call
to QFileInfo::completeBaseName(), which can handle the
different path separators correctly.

Task-number: QTBUG-29700
Change-Id: Ia817b415d303b249f56fcc3d1f073cae99c43046
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-02-20 12:59:55 +01:00
Ray Donnelly
1a0924dfc0 Unify win32-g++ and Unix qmake Makefiles.
Replace the old sed / template @FOO@ method with echo.
Enable MSYS bash to build qmake.exe
Use qmake/Makefile.unix for all win32-g++ builds.

Change-Id: I6e27d69b28d27131838bbbb3a4ee5a08b470f31b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-02-19 10:35:06 +01:00
Frederik Gladhorn
3654a4a3c1 Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2013-02-18 20:03:20 +01:00
Tor Arne Vestbø
4dd29248cd Update feature paths on assignment to QMAKE_PLATFORM
Instead of after parsing the makespecs, were we assumed QMAKE_PLATFORM
had been set by the makespec and did an explicit update.

Allows loading platform specific features from within a makespec after
updating QMAKE_PLATFORM.

Change-Id: I0eb3b7fb88ce48b00a384850c5d87223c06234d7
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-02-18 17:07:17 +01:00
Frederik Gladhorn
f4900d340a Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/widgets/styles/qmacstyle_mac.mm

Change-Id: If8326db9e7da3cbf45dbf7475fdff9915c7723b1
2013-02-18 16:14:52 +01:00
Giuseppe D'Angelo
e88011357e Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2013-02-17 20:31:38 +01:00
Joerg Bornemann
37e4e33c50 fix MSVC build for non-standard command line interpreters
In our incremental linking command block we relied on del never
returning a non-zero exit code. Other command line interpreters
than cmd.exe, e.g. TCC, behave differently.
We now check for existence before trying to delete the manifest
file.

Task-number: QTBUG-29698

Change-Id: I94d125998da6f2c0377104f7e83cdd9e8b838329
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-02-15 15:46:57 +01:00
Oswald Buddenhagen
8e74d136fe purge vestiges of QMAKE_LFLAGS_QT_DLL
Change-Id: Ia86b9cee1044ab915854e0e231e1b3d5d66e1f7d
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-02-13 19:42:43 +01:00
Oswald Buddenhagen
566d28316d remove automatic splitting from $$() expansions
$$(FOO) would automatically split the contents of the environment
variable at whitespace (and interpret quoting inside it). the way to
prevent the splitting (but not the quote interpretation) would be using
"$$(FOO)".

this behavior is entirely unexpected and thus an incredibly effective
source of quoting problems - according to a grep over the whole qt
sources, there isn't a single case where things were done right. in qt
creator, well over half the cases are wrong.

also, the "feature" seems entirely pointless: nobody uses spaces as
separators in environment variables.

consequently, simply remove it, even in a patch release. i'm postulating
that nobody will complain.

Change-Id: I9ed3df1b0d1ef602acd78ceb118611d294561da6
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-02-13 18:42:38 +01:00
Joerg Bornemann
93b155a850 fix check for Windows CE platform
We don't have to do fuzzy mkspec name searches anymore.
The WinCE mkspecs add "wince" to QMAKE_PLATFORM which ends
up in CONFIG.

Change-Id: I6c0576b5504beb416e95eeae0dec579b16b84746
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-02-13 12:42:40 +01:00
Oswald Buddenhagen
5a0ec1b0f3 add ability to override the generated pkg-config file name
introduce the QMAKE_PKGCONFIG_FILE variable for that purpose.

this is another feature that is needed for a bugfix ...

Change-Id: I08f470e1b2b7dd318af9195330c15d813fcd55ef
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-02-06 14:21:44 +01:00
hjk
ab6d29a6cd QMakeParser: save one ByteArray construction
Change-Id: I2845fdefb8b32de227f08017e0e3ad98923d1c87
Reviewed-by: hjk <hjk121@nokiamail.com>
(cherry picked from qtcreator/52be02d1cbbf69d4f82c517c7b633ed3d13b1007)
2013-02-06 14:21:44 +01:00
Orgad Shaneh
601ab660af Remove braces for single lines of conditions
#!/usr/bin/env ruby

Dir.glob('**/*.cpp') { |file|
  # skip ast (excluding paste, astpath, and canv'ast'imer)
  next if file =~ /ast[^eip]|keywords\.|qualifiers|preprocessor|names.cpp/i
  s = File.read(file)
  next if s.include?('qlalr')
  orig = s.dup
  s.gsub!(/\n *if [^\n]*{\n[^\n]*\n\s+}(\s+else if [^\n]* {\n[^\n]*\n\s+})*(\s+else {\n[^\n]*\n\s+})?\n/m) { |m|
    res = $&
    if res =~ /^\s*(\/\/|[A-Z_]{3,})/ # C++ comment or macro (Q_UNUSED, SDEBUG), do not touch braces
      res
    else
      res.gsub!('} else', 'else')
      res.gsub!(/\n +} *\n/m, "\n")
      res.gsub(/ *{$/, '')
    end
  }
  s.gsub!(/ *$/, '')
  File.open(file, 'wb').write(s) if s != orig
}

Change-Id: I3b30ee60df0986f66c02132c65fc38a3fbb6bbdc
Reviewed-by: hjk <qthjk@ovi.com>
(cherry picked from qtcreator/29a93998df8405e8799ad23934a56cd99fb36403)
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2013-02-06 14:21:44 +01:00
Joerg Bornemann
be8c47b140 qmake/MSVC: fix parsing of the /openmp option
Task-number: QTBUG-29143

Change-Id: I6b1ce0babf51701fa404b821b22060a87c4f46b2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-02-04 16:33:17 +01:00
Joerg Bornemann
9c1628aae3 do not parse MSVC option /Gs as /GS
/Gs[size] will be added as additional option as there is no XML element
for this option.

Task-number: QTBUG-29329

Change-Id: I1f09bfdac90f9c5f2333dc03e6e4e6a206b4f6d0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-02-04 16:23:53 +01:00
Joerg Bornemann
4fe029963d qmake/MSVC: do not disable buffer security check per default
The default must be "unset" to let the user's MSVC settings decide
what the default value is.

Task-number: QTBUG-29329

Change-Id: I6015202c123dbb7304941b0d24557a26a1e3236c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-02-04 16:23:32 +01:00
Oswald Buddenhagen
8705480587 support alternative and multiple suffixes in $$resolve_depends()
this is undeniably a new feature, but it's needed for a bugfix.

Change-Id: I951a3128eb580404ee0c7e3cdcb4d6170e899f70
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-02-04 15:10:19 +01:00
Oswald Buddenhagen
864e1ceaf6 don't flush qmake command line twice
otherwise variable assignments (including -config options) from
$QMAKEFLAGS are lost.

Change-Id: I818e9372d2b0ff44333dc3eb8fc3420f84ab01c5
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-02-01 17:38:29 +01:00
Oswald Buddenhagen
feb33916fd remove versioned config backwards compatibility hack
the vendor string was changed, so compat is broken anyway.

Change-Id: I07241843237ce28bd7a869bb4170c7e4c8d084df
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-02-01 10:23:26 +01:00
Mark Brand
6d90c2e9cb adjust paths in installed prl files for mingw
Curiously, qmake could fix .prl and .pc files for unix, but only .pc
files for MinGW. qt_module.prf seems to have known this.

Task-number: QTBUG-28902
Change-Id: Ice9983a69813690c0d4b96ca11589440182569a0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-01-30 15:42:51 +01:00
Mark Brand
d089ecb711 consolidate generation of metafile install targets
Metafiles such as .prl and .pc files contain paths that have to be
adjusted during installation. The same code is used for unix and
windows so move it into the base class.

Change-Id: I82db89ec83820a4fa0214ba15e7cd63438f6dc91
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-01-25 23:30:50 +01:00
Debao Zhang
a909dd0ea4 qmake: Don't let an empty $$VERSION cause a garbled version in .rc files
Change-Id: I7f0560979e645da216674cc70c73c5ea9c053aa6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-01-25 00:40:40 +01:00
Joerg Bornemann
99184f9461 Revert "qmake vcxproj generator: map TARGET_EXT to $(TargetExt)"
This reverts commit e81d7fd1e5.

The insane logic that prepends the version number of a lib to
TARGET_EXT instead of appending it to TARGET breaks every vcxproj
with a library version.
Fixing this properly will require much more work and testing on all
supported Windows platforms.
Forward-port of 8869b3b3 in qt/qt.git.

Task-number: QTBUG-29286
Change-Id: Ib96de9c6f41995af013b146a00c850c9da3a9d8d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-01-24 15:16:19 +01:00
Sergio Ahumada
48e0c4df23 Update copyright year in Digia's license headers
Change-Id: Ic804938fc352291d011800d21e549c10acac66fb
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-01-18 09:07:35 +01:00
Frederik Gladhorn
270a51b775 Merge remote-tracking branch 'gerrit/release' into stable
Change-Id: Ieb104d0e390218a063082c93bc9c7e412af2166d
2013-01-15 18:14:13 +01:00
Kai Koehne
cded50e6f2 MinGW: Statically link runtime libraries into qmake
Avoid runtime dependencies to e.g. libpwinthread-1.dll, libstc++-6.dll.
This prevents Qt Creator from spitting out error dialogs on each startup
for registered MinGW versions that aren't in the default PATH.

Change-Id: Id55518db8c8e0521b6a41add1eaf38f75a892c8b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-01-12 07:16:37 +01:00
Debao Zhang
ad3536b7ad qmake: Add application icon support for windows
A new qmake's variable RC_ICONS is introduced to specify the icons.
The first one will be used as the application's icon.

Change-Id: I4218db795837d470087dff8526eb0e4cb81ce5ed
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-01-10 15:13:46 +01:00
Oswald Buddenhagen
a36a19365c don't overquote deps on .pc and .la files
Change-Id: I00c268b1c0316b6deb0c4e1b2a0c7428e312c682
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-01-08 11:10:24 +01:00
Oswald Buddenhagen
2e35d63fae do not fixify + create QMAKE_{PKGCONFIG,LIBTOOL}_DESTDIR
these variables are somewhat magic: they are relative to DESTDIR, and
they also specify the installation location relative to target.path.
the actual output directories are created by other code.

Change-Id: Iead3006057516f5a49b6fd4bd8996a062c984fce
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-01-08 11:09:52 +01:00
Debao Zhang
4d55b473b3 qmake:Add a case sensitivity flag to ProString::{starts,ends}With()
Change-Id: I457cd8288ae8a0138f7b28321fe87be3308b5215
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-12-21 17:11:46 +01:00
Andy Shaw
3537ecfecb Fix handling of precompiled header files in XCode projects
Task-number: QTBUG-24589
Change-Id: If81e15aa038f418abea25d96a7b7ec773a87d2db
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2012-12-19 21:24:09 +01:00