diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2016-08-29 16:12:03 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2016-08-29 14:54:48 +0000 |
commit | f4b920daae0da57b0ef6df72738fdabbb8a88002 (patch) | |
tree | 575af6d541cab464bb12d9a6a40ed7c42d402b26 | |
parent | 65a7c527a6210a751b2b8b5e9e8fe46a14806d28 (diff) |
Do not use compiler include paths with moc from Qt 4.8
This moc is too old to parse certain header files correctly.
Task-number: QBS-1004
Task-number: QTCREATORBUG-16798
Change-Id: Ic0c7787112d9ab5d334b62ea5c56014d6cd5892f
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
-rw-r--r-- | src/lib/qtprofilesetup/templates/moc.js | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/lib/qtprofilesetup/templates/moc.js b/src/lib/qtprofilesetup/templates/moc.js index 21844f054..c28652779 100644 --- a/src/lib/qtprofilesetup/templates/moc.js +++ b/src/lib/qtprofilesetup/templates/moc.js @@ -39,13 +39,18 @@ function args(product, input, outputFileName) var includePaths = ModUtils.modulePropertiesFromArtifacts(product, [input], 'cpp', 'includePaths'); includePaths = includePaths.uniqueConcat(ModUtils.modulePropertiesFromArtifacts( product, [input], 'cpp', 'systemIncludePaths')); - includePaths = includePaths.uniqueConcat(ModUtils.modulePropertiesFromArtifacts( - product, [input], 'cpp', 'compilerIncludePaths')); + var useCompilerPaths = product.moduleProperty("Qt.core", "versionMajor") >= 5; + if (useCompilerPaths) { + includePaths = includePaths.uniqueConcat(ModUtils.modulePropertiesFromArtifacts( + product, [input], 'cpp', 'compilerIncludePaths')); + } var frameworkPaths = product.moduleProperties("cpp", "frameworkPaths"); frameworkPaths = frameworkPaths.uniqueConcat( product.moduleProperties("cpp", "systemFrameworkPaths")); - frameworkPaths = frameworkPaths.uniqueConcat( - product.moduleProperties("cpp", "compilerFrameworkPaths")); + if (useCompilerPaths) { + frameworkPaths = frameworkPaths.uniqueConcat( + product.moduleProperties("cpp", "compilerFrameworkPaths")); + } var args = []; args = args.concat( defines.map(function(item) { return '-D' + item; }), |