Commit Graph

145 Commits

Author SHA1 Message Date
Oswald Buddenhagen
cc0c394682 escape paths coming from prl files
qmake has the rather bizarre logic that QMAKE_LIBS* is escaped rather
early (instead of right before being written out the the Makefile).
consequently, we need to explicitly escape the paths from the prl files
as well.

Task-number: QTBUG-32326
Change-Id: Ieaf81113d3ca3cf5d8a1ef87c83c5721d6b473ee
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-07-22 19:52:06 +02:00
Oswald Buddenhagen
ff6265bfc2 fix c-quoting of strings which contain quotes
escape backslashes before the quotes, as otherwise we'd escape the
backslashes we just used to escape the quotes.

Change-Id: I88e12c0c2cfc53e0ab8dce9807b06dfce6aa6e78
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-07-22 19:52:06 +02:00
Katja
22d1b3a823 MANIFEST:NO is not written to vcproj
When defining QMAKE_LFLAGS += /MANIFEST:NO to pro file,
it is not written to vcproj in VS2008.
Added MANIFEST:NO generation to vcproj

Task-number: QTBUG-31975

Change-Id: I5f84b30db711bf9c317ca20dc65b207140edb398
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-07-05 11:36:22 +02:00
Oswald Buddenhagen
51980595e1 merge string literals
makes for less visual noise and a tiny bit more efficient code.

Change-Id: I587707fa4e2dc9bead9435bf5caf3a98ab680725
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-07-04 18:13:18 +02:00
Joerg Bornemann
f1cdd4b297 add support for Visual Studio 2013
Add mkspec win32-msvc2013 and make VS 2013 known to configure and
qmake.

Change-Id: I6e63a4d679727a8a3f068f377956185996d72bce
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-07-04 12:54:58 +02:00
Andy Shaw
fa1fb5ed94 Only add the res_file to the generated files if there is no rc_file
If both the rc_file and res_file was added to the project then in MSVC
2012 it would cause an error complaining of a duplicated resource.

Task-number: QTBUG-29826

Change-Id: Ib3401b423208cd8c90895038c9cbadd80c39b542
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-07-02 16:33:08 +02:00
Joerg Bornemann
28a7af7b2a basic manifest tool support in vc(x)proj generator
The removal of embed_manifest_dll or embed_manifest_exe from CONFIG
now disables the embedding of manifests in VS project files.

Task-number: QTBUG-5301

Change-Id: I031318883edca6f9b63a7981ef6c44e3f123f6fd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-25 12:08:38 +02:00
Andy Shaw
442bce78c1 Don't depend on the command for extra compilers automatically
For vcproj files we should not automatically add a dependency for extra
compilers as this should be done via the depends variable for the extra
compiler instead.

This fixes a problem where something like '@echo command' was used in the
command as it would depend on echo and not the actual command anyway.

Change-Id: I7c0aa0d62143aa39c518e8bce65f302afdba33c9
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-20 15:15:45 +02:00
Andrew Patterson
f36374727e Changed project dependencies for solution files
Reorganized project dependency output in solution files for vc 2005+

Task-number: QTBUG-30993

Change-Id: I4764f3d98be40b3e217130522bb89a43bbf3669e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-06-05 08:45:07 +02:00
Joerg Bornemann
853a0b764e fix PlatformToolSet tag location in vcxproj files
The PlatformToolSet tag belongs into the PropertyGroup with the label
"Configuration". The former location in an anonymous PropertyGroup
tricked Visual Studio into displaying the right PlatformToolSet but
using its default value. If VS 2010 and VS 2012 are freshly installed
on the same machine, the default toolset for VS 2012 is VS 2010.

Task-number: QTBUG-30822

Change-Id: If00a532e92b0812c552b1cac52ff77a1e7039146
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-05-30 12:49:48 +02:00
Joerg Bornemann
07f668ab87 qmake/vcxproj: do not set ProgramDataBaseFileName
Visual Studio's default value is perfectly fine.

Task-number: QTBUG-29757

Change-Id: Ic334287539bb849f3b74d255d3991a09008cd357
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2013-05-07 15:03:16 +02:00
Joerg Bornemann
be5c1e836a qmake/vcxproj: remove unused code
Change-Id: I5ac0ae534a7b3205d61cf2980594b74c1ed926a7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-05-07 15:03:07 +02:00
Joerg Bornemann
3c62f4d0c6 qmake/vcxproj: fix parsing of /RTC* options
/RTCsu and /RTCus must be handled as full runtime check options.

Task-number: QTBUG-30711

Change-Id: I783bf49f2ab1d4fd9636dca8e434bccb54844c8c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-05-07 15:02:49 +02:00
Joerg Bornemann
a3d1d41d1d qmake/vcxproj: resurrect support for /we compiler switch
The vcxproj format supports the /we compiler switch as
TreatSpecificWarningsAsErrors tag.
Support for this switch got lost during refactoring of the
vc(x)proj generators for Qt 4.8.0.

Task-number: QTBUG-29098

Change-Id: I607e907dcb9c1bc7d261053b6d757941ec7db822
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-05-07 15:02:38 +02:00
Joerg Bornemann
699e44ac03 fix quoting issues in vcxproj generator
Fix passing of preprocessor definitions with double quotes to the
resource compiler and to MIDL. Both have a different escaping mechanism
then the C/C++ compiler tool. This fixes a regression introduced in
9e9911715c.

Task-number: QTBUG-30859

Change-Id: Ifa041df407030320847373a5964a547c39dd5439
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-04-29 16:56:58 +02:00
Andy Shaw
dd567c6882 Write two missing linker options to the vcxproj file
Both the /NXCOMPAT and /DYNAMICBASE options were handled by qmake but
never written to the vcxproj file even if they were set in the pro file.

Change-Id: I4ca26fb312648944c25d3a24cdc8c640c9de619d
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-04-11 10:41:23 +02:00
Joerg Bornemann
f90607870a qmake/nmake: do not remove NDEBUG from DEFINES
In ebc4fb45 all NDEBUG defines were removed from DEFINES to adjust the
nmake generator's behavior to the vcproj generator.
Turns out that the vcproj generator did it wrong.
The user must be able to specify NDEBUG in DEFINES.

Change-Id: Iaaf3915ac79acbbd1e7a3172ad3951d0d686041b
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-04-09 17:49:32 +02:00
Joerg Bornemann
925fd32a2d qmake/Win: disable "find highest lib version" feature by default
The undocumented feature of linking the library with the highest
version number is more confusing than helpful.
We're changing the default from on to off now.
Users who still need this feature can turn it on with:
    CONFIG += link_highest_lib_version

Task-number: QTBUG-15596

Change-Id: Ic998c1685003caa6f57e27dccf83c8b4a2a09553
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-26 21:44:15 +01:00
Laszlo Papp
fff8b698ab Introduce QMAKE_CC_O_FLAG
This makes it possible to properly parametrize alternative compilers.

Change-Id: Iaf0961c47875ee16d815356f36acf5652577cdca
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-25 23:11:22 +01:00
Samuel Rødal
2ab9b747fc Merge remote-tracking branch 'gerrit/release' into stable
Conflicts:
	configure
	mkspecs/features/qt_module_headers.prf
	mkspecs/features/qt_tool.prf
	src/angle/angle.pro
	src/tools/bootstrap/bootstrap.pro
	tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp

Change-Id: Ide5759fe419a50f1c944211a48f7c66f662684e0
2013-03-21 08:49:01 +01:00
Sergio Ahumada
e5a11fbb32 Merge "Merge branch 'dev' into stable" into refs/staging/stable 2013-03-20 23:30:31 +01:00
Montel Laurent
9ff6237a83 Initialize usePCH variable
Change-Id: I3618887416603a02812263b7b3fbf698fa1cefd3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-03-20 18:42:50 +01:00
Oswald Buddenhagen
76c0be34cd Merge branch 'dev' into stable
This starts Qt 5.1 release cycle

Conflicts:
	src/gui/text/qfontdatabase.cpp
	src/gui/text/qharfbuzz_copy_p.h
	src/widgets/kernel/qapplication.cpp
	src/widgets/kernel/qcoreapplication.cpp

Change-Id: I72fbf83ab3c2206aeea1b089428b0fc2a89bd62b
2013-03-20 13:49:28 +01:00
Axel Waggershauser
b11317a643 Whitespace cleanup: remove trailing whitespace
Remove all trailing whitespace from the following list of files:
*.cpp *.h *.conf *.qdoc *.pro *.pri *.mm *.rc *.pl *.qps *.xpm *.txt *README
excluding 3rdparty, test-data and auto generated code.

Note A): the only non 3rdparty c++-files that still
have trailing whitespace after this change are:
* src/corelib/codecs/cp949codetbl_p.h
* src/corelib/codecs/qjpunicode.cpp
* src/corelib/codecs/qbig5codec.cpp
* src/corelib/xml/qxmlstream_p.h
* src/tools/qdoc/qmlparser/qqmljsgrammar.cpp
* src/tools/uic/ui4.cpp
* tests/auto/other/qtokenautomaton/tokenizers/*
* tests/benchmarks/corelib/tools/qstring/data.cpp
* util/lexgen/tokenizer.cpp

Note B): in about 30 files some overlapping 'leading tab' and
'TAB character in non-leading whitespace' issues have been fixed
to make the sanity bot happy. Plus some general ws-fixes here
and there as asked for during review.

Change-Id: Ia713113c34d82442d6ce4d93d8b1cf545075d11d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-16 20:22:50 +01:00
Oswald Buddenhagen
ec145129c3 fix setup of output directory for subprojects in IDE generator backends
unlike before, the output dir is now important already during the project
evaluation phase, as finding .qmake.conf depends on it if .qmake.cache is
also present.

ChangeLog: fixed qmake -tp vc (and configure without -no-vcproj)
Change-Id: Ifdb95f3b38a70c0d08e71238059292e761dcfa53
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2013-03-15 18:06:31 +01:00
David Schulz
92f59be2b4 qmake: fix library path on windows.
Convert '/' to '\' in library pathes.

Change-Id: I0cf8a522a901199fddd59c863c932f214e1ab968
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-03-13 17:24:49 +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
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
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
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
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
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
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
Joerg Bornemann
cdff53cda8 fix DLL manifest resource ids for debug builds
The resource id must be 2 for DLLs. This was broken for the
"debug with incremental linking" case.

Task-number: QTBUG-28682
Task-number: QTBUG-28683
Change-Id: Id8c48a1dec30e341de949213c63c1c9b73956dac
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-12-18 19:30:06 +01:00
Joerg Bornemann
3e94e8daf3 fix duplicate TRANSLATION entry in generated RC file
Task-number: QTBUG-28625

Change-Id: I9bd6098c7557ca008211acef172f5c51a6766998
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-12-17 14:08:17 +01:00
Joerg Bornemann
03e1e4138c qmake: fix manifest embedding for DLLs
Manifests must be embedded into DLLs with the resource id 2, not 1.
This fixes a regression introduced in commit c9406bcf.

Task-number: QTBUG-28524

Change-Id: I93b1dfe4614d0535f47fd881b8688a23e83e845f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Ismo Haataja <ismo.haataja@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-12-11 18:34:19 +01:00
Joerg Bornemann
f9ebe26aae support include paths for the Windows resource compiler
In RC_INCLUDEPATH one can add include paths for the Windows resource
compiler.

Task-number: QTBUG-13776

Change-Id: If1d9ed44097adb7789df03e4ccd4e3b7df9e8d08
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-12-10 10:17:25 +01:00
Joerg Bornemann
e23e224498 qmake: fix extra compilers in vcxprojs for single config mode
In single config mode extra compilers were not written to Visual
Studio project files, because they were not added to the fake project
object we're using to write a single config project.

Task-number: QTBUG-27505

Change-Id: Ie57b648861573496252f1383dc77e0729e244947
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-12-10 10:17:17 +01:00
Joerg Bornemann
a79b898299 qmake: add ProductVersion to automatically generated resource
ProductVersion is set to the same value as FileVersion.

Task-number: QTBUG-27428

Change-Id: Ia01e14112d3a0e74b9fbe5fc8d9c4f9ae690db34
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-12-06 16:46:03 +01:00
Joerg Bornemann
b4b02fe876 MSVC: don't use the variable name LINK in generated makefiles
Rename LINK to LINKER. The MSVC linker uses the environment
variable LINK to pass additional command line arguments.
We must not hide this variable.

Task-number: QTBUG-28332

Change-Id: Id78476d1cf4a73175b9f47292c67f38a43ae5ba4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-12-06 14:46:13 +01:00