Important: Please read the Qt Code of Conduct -

QBS and ui in StaticLibrary

  • Hello,

    I'm trying to move quite big project to qbs. And we have library with a self-made widget inside.
    Problem that in header of this widget we have
    @#include "ui_SomeWidget.h"@

    and when we then include this widget from main project, compiler can't find ui_*.h files. And thats correct because this files are inside "GeneratedFiles"
    So, what i want to do is to export this path as includePaths from StaticLibrary, something like
    @Export {
    Depends { name: "cpp" }
    cpp.includePaths: project.AllincludePathes

    But i can't find what should i say as value for cpp.includePaths.
    Any help and tips highly appreciated.

    Thank you.

  • Ok, i found working solution:
    @Export {
    Depends { name: "cpp" }
    cpp.includePaths: product.buildDirectory + "/GeneratedFiles/" +

    But it is looks ugly, because of hardcoded "GeneratedFiles".
    Does anybody know better way?

Log in to reply