How to use include_directories() and cc.find_library() in generated code? #13127
-
Hey, I'm trying to port our existing build system to Meson and making very good progress so far. However one component is making me scratch my head a bit: It's a code generator from the Xilinx SDK that I have absolutely no control over. With a single command it generates a source-tree and a Makefile to build some libraries from those sources. I am of course able to run this generator from Meson, and also run the Makefile. But then I need to find these libraries in the output directory, so I can link against them. And also I am required to have an Right now I'm generating the code in my source-dir (which is bad of course) and get the structure to work using a
I of course know how to run |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
I don't suppose that external_project modules would fit what you're doing? |
Beta Was this translation helpful? Give feedback.
-
Are you able to run the generator using a custom current working directory to control the location it is produced in? Does it make sense to run a script as a meson target that both executes the code generator and the Makefile, and from meson's perspective only produces the library itself as an output? Does the generator emit a complex directory structure of output files or are all produced outputs in the same directory? Are the output filenames predictable? |
Beta Was this translation helpful? Give feedback.
-
I kind of I got it to work with a
and a
but I don't really understand and trust it... |
Beta Was this translation helpful? Give feedback.
I kind of I got it to work with a
build.sh
similar toand a
meson.build
like