Hello, Kai

First of all, the property was not removed but was made «private» and is now 
called _outputDir. You can still override it or read it.

The reason why it was removed is that I didn’t see valid use-cases for that.

For example, to export include paths you should do something like that:

StaticLibrary {
    files: [«a.cpp», «b.proto»]
    Depends { name: «protobuf.cpp» }
    Export {
         Depends { name: «protobuf.cpp» } // this should export protobuf.cpp 
properties, including cpp.IncludePath
    }
}

However, your second use-case (installation) is totally new to me and it seems 
that you need to read this property.
Unless someone can suggest a better solution, feel free to upload a patch to 
return the property.
You might also want to assign custom tags for generated files (e.g. 
«proto_hpp», «proto_cpp») to make filtering more fine-grained and avoid 
overlapping with other headers.

Ivan

> 15 сент. 2020 г., в 09:00, Kai Dohmen via Qbs <qbs@qt-project.org> написал(а):
> 
> Hello,
> 
> the subject states my Question.
> Normally I create a static library from proto files. This static library can 
> be linked into different applications. This really comes in handy when using 
> conan.
> But since protobuf.outputDir was removed I cannot set the Exported 
> includePaths dir properly.
> Furthermore when installing the generated header files I cannot use the 
> Groups property installSourceBase to match the installed directory structure 
> to the proto files ones.
> 
> What is the right way of using proto files as a library? Should they get 
> compiled or should they append to the depending products source files?
> 
> Thanks,
> Kai
> _______________________________________________
> Qbs mailing list
> Qbs@qt-project.org
> https://lists.qt-project.org/listinfo/qbs

_______________________________________________
Qbs mailing list
Qbs@qt-project.org
https://lists.qt-project.org/listinfo/qbs

Reply via email to