Javascript// core.qbsProduct { property bool isDynamicLib type: isDynamicLib ? "dynamiclibrary" : "staticlibrary" name: "core" // ... Export { // ... Parameters { core.isDynamicLib: true } }} // app1.qbsCppApplication { // ... Depends { name: "core"; core.isDynamicLib: false }}
Depends { name: "myplugin"; cpp.link: false }
StaticLibrary { name: "foo-static"}DynamicLibrary { name: "foo" Depends { name: "foo-static"; cpp.linkWholeArchive:true }}CppApplication { name: "app1" Depends { name: "foo-static" }}CppApplication { name: "app2" Depends { name: "foo" }}
$ cat "/Applications/Qt/Qt Creator.app/Contents/Resources/qbs/share/qbs/imports/qbs/base/NativeBinary.qbs"...Product {... property bool isForDarwin: qbs.targetOS.contains("darwin") property bool isBundle: isForDarwin && bundle.isBundle... Depends { name: "bundle"; condition: isForDarwin }...}
Export { Depends { name: "cpp" } cpp.includePaths: [product.sourceDirectory] }
qt-test-subprojects/app2/main.cpp:6:10: fatal error: 'core.h' file not found#include "core.h" ^~~~~~~~1 error generated.
Product { name: "B" Depends { name: "A" } Export { Depends { name: "A" } }}