-
BLUF: I need different versions of a subproject in the same meson project. Those different versions do not get linked together. I am working on an embedded C project that has many subprojects (drivers for various ICs, CODECs, peripheral libraries, etc.). One of those subprojects is an I2C library, and I'm using a particular major version of that library. The output of the overall project is a *.hex that gets flashed to a microcontroller. I would also like to add a bootloader to this project, which involves a separate *.hex file that gets flashed as the bootloader as well as a modified version of the application *.hex. This bootloader also depends on some of the same libraries as the application code, but I would like to use a different major version of the I2C subproject to create the bootloader *.hex file. The subprojects are wrap-git files with different branches for different major versions, so I'm able to specify my major version with the "revision" option in the wrap-git file. Is there some way that I can tell meson to build one of my executables with one version (branch) of a subproject, and another executable with another version? As a bonus, I would like to enforce that some subprojects are a common version beween the application .hex and the bootloader .hex. Is there some way to both enforce a common subproject dependency and allow different versions of a different subproject dependency? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You can have |
Beta Was this translation helpful? Give feedback.
You can have
foo-1.0.wrap
withdirectory=foo-1.0
andfoo-2.0.wrap
withdirectory=foo-2.0
. You can then use them asdependency('foo-1.0', fallback: ['foo-1.0', 'foo_dep'])
anddependency('foo-2.0', fallback: ['foo-2.0', 'foo_dep'])
. So basically, add the version into the wrap, directory and dependency names.