Open csetlow opened 5 years ago
Hi @csetlow
I have updated the example to show how you can call moc
.
Basically, you would use a genrule
like so:
genrule(
name = 'my-class',
out = 'my-class.cpp',
srcs = [
'my-class.cpp',
],
cmd = 'moc $SRCS > $OUT',
)
You could even make your own macro:
function moc(name, src):
native.genrule(
name = name,
out = 'moc.cpp',
srcs = [ src ],
cmd = 'moc $SRCS > $OUT',
)
Used like so:
moc(
name = 'my-class',
src = 'my-class.cpp',
)
Hi njlr,
The .buckconfig in this repo is empty and I don't see any rules in the BUCK file to invoke moc. Am I correct in assuming this example doesn't support Qt features that depend on Q_OBJECT and moc?