[build2] Build system module for code-generation utilities (Qt moc, etc.)
Sam Schweigel
s.schweigel at gmail.com
Sat May 4 23:40:48 UTC 2019
Hello,
I've had a lot of success packaging libraries for build2 so far, and I'd
like to experiment with getting Qt5 building using it, which involves a
number of preprocessing steps (moc, rcc, uic). I understand that these
would be implemented as build system modules, and that eventually the
plan is to have dynamically-loadable build system modules that would be
packaged with the build tools themselves. To get a feel for the build2
codebase, I've tried to implement a `moc` rule myself:
using cxx moc
exe{hello}: cxx{file1} hxx{file1} cxx{file1_moc}
cxx{file1_moc}: hxx{file1}
Where the `moc` module introduces no target types and contains a rule
that can turn an `hxx{xyz}` into an `cxx{xyz_moc}`. Is this the
idiomatic way of doing this?
Additionally, I'd like to be able to scan all the `hxx` targets for the
string `Q_OBJECT`, and inject all targets that depend on that header
with a dependency on `cxx{blah_moc}`. Where should the logic for this
go?
Thank you for all your hard work on build2,
Sam
More information about the users
mailing list