[QBS] static library dependency always recompiles

arturo castro me at arturocastro.net
Wed Sep 30 11:53:11 CEST 2015


Hi

I develop an open source library which i also use in my projects. I have
created a qbs project for my applications that has the library's qbs as
a dependency, using reference. The problem is that whenever i start a
new application it recompiles the library completely.

Instead of recompiling every time i create a new application i would
like for the library to always compile in the same folder. So if i
create a new project the library is already compiled. That way i don't
end up with a lot of copies of the library's .o in every application
that depends on it.

With qmake i can do that but qbs doesn't allow to specify the build
directory.

I've also tried to include the library project as a subproject instead
of a reference in hope that that would make the library project
recompile in it's own build directory but it always recompiles all the
objects in the application build directory.

In qtcreator there's this option to set a project as a dependency of
another, and that kind of works but that setting is lost when the
projects are closed.

Is there anyway around this?

Thanks



More information about the Qbs mailing list