This branch is in the bro, cmake, binpac, and bro-aux git repos. The changes theoretically make it possible to build Bro plugins without pointing them at a Bro source/build tree, but instead allowing them to work entirely from a Bro installation tree. I say "theoretically" because I've only tested it with a single plugin (corelight/bro-quic). But this should generally facilitate packagers creating "bro-devel" packages that contain headers and other files that would be needed to build a plugin (e.g. ).
The feedback from Robin is now addressed in master branches:
The binpac headers install directly into prefix/include, how about collecting them in prefix/include/binpac/* instead?
Sure, I was mostly hesitant to do that because it deviates from the standard/historical way binpac installs headers in relation to the install prefix, but seems fine if I just change the FindBinPAC.cmake script to account for either possible location.
My installation ends up with a number of CMakeFiles directories in prefix/include/bro
For testing this, I moved away the source tree and then I tried following our docs for writing at plugin (https://www.bro.org/sphinx-git/devel/plugins.html). That almost worked, except that the skeleton's configure didn't find binpac/caf/broker; output below. I would have expected this to work through bro-config (which was in PATH). It all worked once I specified that paths explicitly /configure --with-binpac=$HOME/tmp/bro --with-caf=$HOME/tmp/bro --with-broker=$HOME/tmp/bro.
Those paths should now get taken automatically from bro-config (for unknown reason I originally had a testing environment that didn't require those flags, but I did notice the same problem you had when going to a different system).