[QBS] RFC pkgconfig support
Joerg Bornemann
joerg.bornemann at nokia.com
Thu Feb 23 10:52:11 CET 2012
Here's a sketch of how we could add pkgconfig support (or other
configure-like stuff) to qbs. (The used Process "class" doesn't exist yet.)
---myapp.qbp---
Application {
name: "myapp"
Depends { name: "pkconfig" }
pkconfig.packages: ["opengl", "zlib"]
}
---pkconfig/module.qbs---
Module {
property var binary: "pkgconfig"
property var packages
Depends { name: "cpp" }
cpp.cxxflags: cpp.cflags
cpp.cflags: {
var p = new Process();
var exitCode = p.start(binary, "--cflags");
var output = p.readAll();
return output;
}
cpp.ldflags: {
var p = new Process();
var exitCode = p.start(binary, "--libs");
var output = p.readAll();
return output;
}
}
Comments appreciated.
Jörg
More information about the Qbs
mailing list