We are happy to announce version 1.11.0 of the Qbs build tool.
The long-existing list properties qbs.targetOS and qbs.toolchain have been complemented by their scalar counterparts qbs.targetPlatform and qbs.toolchainType, respectively. The new properties make it easier to specify the target platform on the command line and in profiles, while you should still use the existing ones in your project files for purposes such as conditional compilation.
Modules can now declare their own target artifacts using the new filesAreTargets property of the Group item. The next version of Qbs will add the ability to auto-generate such modules from your products. These modules can then be distributed along with the binaries so that other Qbs projects can make use of them by simply declaring a dependency on the module.
In addition to TextFile, we now also have BinaryFile for reading and writing binary files.
We have added the property cpp.rpathOrigin, which evaluates to @loader_path on Darwin and $ORIGIN on other Unix-like platforms.
You can now specify flags to be passed to the compiler frontend only when linking via the cpp.driverLinkerFlags property.
The value "c++17" is now properly supported for cpp.cxxLanguageVersion, emitting the /std:c++17 flag when using an MSVC compiler that supports it.
The auto-detection mechanism for GCC-like compilers now considers typical MinGW prefixes, that is, file names such as i686-w64-mingw32-gcc are picked up from the search path.
The syntax for specifying configuration names has always been rather confusing, which is why they are now passed using the new config key. For instance, to build your project for two independent configurations called debug and release, you now write:
$ qbs config:debug config:release
As a result, all command-line parameters are now either options, option arguments or key-value pairs.
We have also dropped the requirement that property assignments have to appear after all options. This comes in particularly handy when amending earlier inputs using the shell history.
The item and module references were re-designed, resulting in much-improved readability.
The "run" functionality as used by the command of the same name now considers an executable's library dependencies, that is, it adds the paths they are located in to the respective environment variable (PATH on Windows, DYLD_LIBRARY_PATH/DYLD_FRAMEWORK_PATH on macOS and LD_LIBRARY_PATH on other Unix-like systems). This also works when running from Qt Creator.