diff options
author | Jake Petroules <jake.petroules@petroules.com> | 2013-01-06 19:31:07 -0500 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@digia.com> | 2013-01-08 13:51:06 +0100 |
commit | ac3f424760ca48042f7e5ba3bad26cc15a718a2e (patch) | |
tree | 6d27be4a65cd6034c6b91885fe6b4d45e162c666 /share | |
parent | af0d65daf10c1ef5b42f53943c781caaa34b7d14 (diff) |
Fix framework include path handling on OS X.
Task-number: QBS-197
Change-Id: I3fed74d1ac08b5d4247563e8a381160d8856c296
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'share')
-rw-r--r-- | share/qbs/modules/cpp/GenericGCC.qbs | 6 | ||||
-rw-r--r-- | share/qbs/modules/cpp/gcc.js | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/share/qbs/modules/cpp/GenericGCC.qbs b/share/qbs/modules/cpp/GenericGCC.qbs index ed2843a9f..4ad80480d 100644 --- a/share/qbs/modules/cpp/GenericGCC.qbs +++ b/share/qbs/modules/cpp/GenericGCC.qbs @@ -241,6 +241,7 @@ CppModule { prepare: { var includePaths = ModUtils.appendAll(input, 'includePaths'); + var frameworkPaths = ModUtils.appendAll(product, 'frameworkPaths'); var systemIncludePaths = ModUtils.appendAll(input, 'systemIncludePaths'); var cFlags = ModUtils.appendAll(input, 'cFlags'); var cxxFlags = ModUtils.appendAll(input, 'cxxFlags'); @@ -301,7 +302,7 @@ CppModule { if (cFlags) args = args.concat(cFlags); } - args = args.concat(Gcc.additionalFlags(product, includePaths, systemIncludePaths, input.fileName, output)) + args = args.concat(Gcc.additionalFlags(product, includePaths, frameworkPaths, systemIncludePaths, input.fileName, output)) var cmd = new Command(product.module.compilerPath, args); cmd.description = 'compiling ' + FileInfo.fileName(input.fileName); cmd.highlight = "compiler"; @@ -319,12 +320,13 @@ CppModule { prepare: { var args = Gcc.configFlags(product); var includePaths = ModUtils.appendAll(input, 'includePaths'); + var frameworkPaths = ModUtils.appendAll(product, 'frameworkPaths'); var systemIncludePaths = ModUtils.appendAll(input, 'systemIncludePaths'); args.push('-x'); args.push('c++-header'); if (product.module.cxxFlags) args = args.concat(product.module.cxxFlags); - args = args.concat(Gcc.additionalFlags(product, includePaths, systemIncludePaths, + args = args.concat(Gcc.additionalFlags(product, includePaths, frameworkPaths, systemIncludePaths, product.module.precompiledHeader, output)); var cmd = new Command(product.module.compilerPath, args); cmd.description = 'precompiling ' + FileInfo.fileName(input.fileName); diff --git a/share/qbs/modules/cpp/gcc.js b/share/qbs/modules/cpp/gcc.js index fbb3d0cc0..e558b9e62 100644 --- a/share/qbs/modules/cpp/gcc.js +++ b/share/qbs/modules/cpp/gcc.js @@ -62,7 +62,7 @@ function removePrefixAndSuffix(str, prefix, suffix) // ### what we actually need here is something like product.usedFileTags // that contains all fileTags that have been used when applying the rules. -function additionalFlags(product, includePaths, systemIncludePaths, fileName, output) +function additionalFlags(product, includePaths, frameworkPaths, systemIncludePaths, fileName, output) { var args = [] if (product.type.indexOf('staticlibrary') >= 0 || product.type.indexOf('dynamiclibrary') >= 0) { @@ -89,6 +89,8 @@ function additionalFlags(product, includePaths, systemIncludePaths, fileName, ou args.push('-D' + defines[i]); for (i in includePaths) args.push('-I' + includePaths[i]); + for (i in frameworkPaths) + args.push('-F' + frameworkPaths[i]); for (i in systemIncludePaths) args.push('-isystem' + systemIncludePaths[i]); args.push('-c'); |