diff options
author | Ivan Komissarov <abbapoh@gmail.com> | 2020-08-14 21:01:17 +0200 |
---|---|---|
committer | Ivan Komissarov <ABBAPOH@gmail.com> | 2020-08-17 17:09:03 +0000 |
commit | 527d5a8ec54e44291d4968754bdf574ebe57822b (patch) | |
tree | 05b653903678bd33a7accf5ee54d9a8ef01d9a51 /share | |
parent | e42ad799703412d7375465df49282dd960f81e2e (diff) |
Fix passing compiler defines to moc
This fixes the issue that Qbs doesn't pass the compiler defines to moc
when processing header files which resulted to Q_OS_* being not defined.
Fixes: QBS-1592
Change-Id: I58a0cc9af5cfa2fb4a370bb0d7204a3b100da437
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'share')
-rw-r--r-- | share/qbs/module-providers/Qt/templates/moc.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/share/qbs/module-providers/Qt/templates/moc.js b/share/qbs/module-providers/Qt/templates/moc.js index dfc72b7c1..92983e4f7 100644 --- a/share/qbs/module-providers/Qt/templates/moc.js +++ b/share/qbs/module-providers/Qt/templates/moc.js @@ -35,7 +35,7 @@ function args(product, input, outputs) var defines = product.cpp.compilerDefinesByLanguage; if (input.fileTags.contains("objcpp")) defines = ModUtils.flattenDictionary(defines["objcpp"]) || []; - else if (input.fileTags.contains("cpp")) + else if (input.fileTags.contains("cpp") || input.fileTags.contains("hpp")) defines = ModUtils.flattenDictionary(defines["cpp"]) || []; else defines = []; |