Set a property declared in one qbs project from another -
i have typical application dev scenario, library + application, both qbs projects. in library project declared boolean property staticbuild default true follow:
project { // library property bool staticbuild: true product { type: staticbuild ? "staticlibrary" : "dynamiclibrary" name: "lib" } }
in application project use depends item add lib dependency follow:
project { // application product { type: "application" depends { name: "lib" } lib.staticbuild: false // want link dll. } }
but property referencing not work, error telling me property not declared.
how fix ?.
first of all, library not have property; parent project does. if did, not visible, less settable, outside. keep in mind library exists once, while there many dependencies on it. if want make decision how library built, need @ higher level, both products take information. common parent project (typically top-level one), or project-specific module both products pull in. main point decision made in central place.
Comments
Post a Comment