compiling with automake

18 views
Skip to first unread message

SR D

unread,
Oct 21, 2021, 1:45:48 PM10/21/21
to Cap'n Proto
I would like to make use of capnproto in an autotools project and wondering if anyone has any references or examples as to how to do basic compiling with a Makefile.am. Especially w.r.t. the cmake equivalent of capnp_generate_cpp().

Any help appreciated.





Kenton Varda

unread,
Oct 21, 2021, 2:02:05 PM10/21/21
to SR D, Cap'n Proto

On Thu, Oct 21, 2021 at 12:45 PM SR D <software.resea...@gmail.com> wrote:
I would like to make use of capnproto in an autotools project and wondering if anyone has any references or examples as to how to do basic compiling with a Makefile.am. Especially w.r.t. the cmake equivalent of capnp_generate_cpp().

Any help appreciated.





--
You received this message because you are subscribed to the Google Groups "Cap'n Proto" group.
To unsubscribe from this group and stop receiving emails from it, send an email to capnproto+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/capnproto/1fc1a675-2ed5-41fc-8dd2-d81e23517cfbn%40googlegroups.com.

SR D

unread,
Oct 21, 2021, 2:58:04 PM10/21/21
to Cap'n Proto
Hi Kenton,

I don't have an issue with setting up and building libraries and linking my own programs to external libs like capnproto using Autotools. My problem is that, I have a test.capnp file and I don't know how to call/run the capnp tool via a Makefile.am to produce the *.capnp.h and *.capnp.c++ files.

Or did I miss your point in understanding that this would happen by nesting packages?

Kenton Varda

unread,
Oct 21, 2021, 3:06:43 PM10/21/21
to SR D, Cap'n Proto
Once the capnp subproject build is done, you should be able to invoke the `capnp` compiler straight from the subproject location. I think you'd have to write a raw make rule that invokes the compiler. You can see how Cap'n Proto's own build does this here:


-Kenton

Reply all
Reply to author
Forward
0 new messages