On Thu, 3 Jan 2019 22:14:09 +0100
Björn Schäpers <[email protected]> wrote:
> I'm trying to build a repository for multiple libraries and applications,
> where
> every product is located in an own submodule. Right now I'm at this point:
>
> root/
> - all.qbs
> - libs/
> - libs.qbs
> - up.qbs
> - lib1/
> - lib1.qbs
> - lib2/
> - lib2.qbs
>
> Lib2 needs lib1. The file contents are as follows (striped to what I think is
> relevant):
>
> lib1.qbs
> Product {
> name: "Lib1"
> Export { cpp.includePaths: ["./include"] }
> }
>
> lib2.qbs
> Project {
> references: ["../up.qbs"]
> Depends { name: "Lib1" }
> }
>
> up.qbs
> Project { references: ["../all.qbs"] }
>
> all.qbs
> Project { references: ["libs/libs.qbs"] }
>
> libs.qbs
> Project { references: ["lib1/lib1.qbs", "lib2/lib2.qbs"] }
>
> Trying to compile lib2 I get the message "Cycle detected while referencing
> file
> 'lib2/lib2.qbs'." And the Include-Path is not added (although QtCreator did
> find
> the headers for auto completion).
>
> The message is clear, but not how do I solve this problem? I want the
> libraries
> to be able to use other libraries, without knowing their path, only their
> name.
Are you saying you want to be able to open a library project file in isolation
(as opposed to the top-level project) and expect it to know everything else? If
so, may I ask why? Obviously, you are relying on the entire project to be
present anyway, so why not work with that one?
Christian
_______________________________________________
Qbs mailing list
[email protected]
https://lists.qt-project.org/listinfo/qbs