[QBS] How to setup an custom profile without Qt?

Jake Petroules jake.petroules at petroules.com
Fri May 16 22:41:20 CEST 2014


On 2014-05-16, at 02:36 PM, Denis Shienkov <denis.shienkov at gmail.com> wrote:

> Hi all.
> 
> I have an two questions:
> 
> 
> 1) I want to setup manually an custom profile with the custom qbs and 
> cpp options, without Qt (using the "qbs-config" utility).
> 
> E.g. here http://qt-project.org/doc/qbs-1.2/qt-versions.html I see that 
> is used a path to the qmake:
> 
> {quote}
> qbs setup-qt /usr/bin/qmake myqt
> {quote}
> 
> but in my case I do not want to use Qt at all. So, how I can do it 
> without specifying an Qt? It is possible?
> 
> 
> 2) I want to specify a custom options to the qbs and the cpp module, 
> e.g. with custom compiler, custom architecture and so on.
> 
> E.g. by analogy with available MSVC profile:
> 
> ...
> profiles.MSVC2012_x86.cpp.toolchainInstallPath: C:\Program Files 
> (x86)\Microsoft Visual Studio 11.0\VC\bin
> profiles.MSVC2012_x86.cpp.windowsSDKPath:
> profiles.MSVC2012_x86.qbs.architecture: x86
> profiles.MSVC2012_x86.qbs.targetOS: windows
> profiles.MSVC2012_x86.qbs.toolchain: msvc
> ...
> 
> I want to create a profile, e.g. for KEIL compiler, like:
> 
> ...
> profiles.KEIL_C51.cpp.toolchainInstallPath: <path/to/keil/compiler>
> profiles.KEIL_C51.cpp.windowsSDKPath:
> profiles.KEIL_C51.qbs.architecture: C51
> profiles.KEIL_C51.qbs.targetOS: none
> profiles.KEIL_C51.qbs.toolchain: keil
> ...
> 
> It is possible?
> 
> BR,
> Denis
> 
> 
> _______________________________________________
> QBS mailing list
> QBS at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qbs

Hi Denis,

Setting up custom toolchains is quite easy. All you need to do is run qbs-config <property> <value>, for example:

$ qbs-config profiles.KEIL_C51.cpp.toolchainInstallPath C:/Keil
$ qbs-config profiles.KEIL_C51.cpp.windowsSDKPath C:/WinSDK
$ qbs-config profiles.KEIL_C51.qbs.architecture c51
$ qbs-config profiles.KEIL_C51.qbs.targetOS none
$ qbs-config profiles.KEIL_C51.qbs.toolchain keil

If you don't want to use Qt, simply don't add any Qt properties to your profile. I believe this answers both your questions.
-- 
Jake Petroules - jake.petroules at petroules.com
Chief Technology Officer - Petroules Corporation


More information about the Qbs mailing list