[Meson-devel] Use of sub directories
Brought to you by:
jussip
From: Lars P. <lar...@gm...> - 2014-01-19 20:23:32
|
I got it working for my (medium complex) project now (see Ephenation client<https://github.com/larspensjo/ephenation-client/blob/mesonbuild/Source/meson.build> ). I have several sub folders with source code, but so far I have only one main meson.build. The list of source code files is rather long, and it would be nice to specify a separate list for each sub directory. I am not sure how to best do that. I can use the subdir() command to access a local meson.build in each sub directory. That works, but there are some minor inconveniences: 1. Each local meson.build will have to create a global variable that contains a list of file names. This global variable then has to be referred to from the main meson.build. 2. The list of local files has to include the name of the sub directory. An alternative solution is to use subproject() and static libraries. But these sub projects will not get access to states defined by the main project, which is a problem to me as they are really part of the same project. Best regards, Lars Pensjö |