Details
-
Bug
-
Resolution: Cannot Reproduce
-
P2: Important
-
2.2.1
-
None
Description
Previous "Custom build tool" produced proper output. Compare what was generated before and after. We have custom lib with "includes/Qqt/ColorEditButton.h" file outside project dir.
Before:
in Visual Studio 2015 -> Solution Explorer -> header file -> properties -> Custom build tool -> Command line -> there is option with proper path:
-f../../../includes/Qqt/ColorEditButton.h"
After:
New msbuild-based addin 2.2.1 produces wrong output: Solution Explorer -> header file -> Properties -> Qt Meta-Object Compiler -> "Force include" contains only
../../%(Filename)%(Extension)
So produced include statement is wrong and included file is not found and moc_*.cpp fails to compile.
Steps to reproduse
create folder near the project directory (not inside project directory), create subfolder there, place header there with class with Q_OBJECT statement, choose Visual Studio - "add existing file" command. Try to build. We use precompiled header, if it depends on it, and files from that project are included also in precompiled header. Solution explorer ->project ->properties -> VC++ directories - contains folder "includes", if it depends on it.
Workaround
Solution explorer - Project ->Properties -> Qt meta-Object Compiler -> Force include: change "../../%(Filename)%(Extension)" to %(FullPath)