Handling cmake-based subproject with non-standard layout #10362
-
I'm trying to handle a cmake-based subproject in which the CMakeLists.txt is not in the root of the project. For example:
Currently in a I've started to encounter some projects where some assumptions are baked into the Is it possible to provide a path to the desired |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
No, nor to have I have a question in return: why isn't it in the project root? ... A somewhat related question is, is the project root actually the project root? What I mean by this is, there are projects where a cmake project is only part of the source tree, and the rest is unrelated code -- maybe it's a monorepo, maybe it is a library available in a variety of languages and the CMakeLists.txt is only in the cpp/ directory which is all you want. In such cases, the correct solution is probably to release a tarball for just the cmake project (and source code). ... Given the actual directory structure We have faced the same problem in the WrapDB with the zstd project (they use It does require the meson.build be intentionally structured with the intention to work this way, which is painful but not insurmountable. |
Beta Was this translation helpful? Give feedback.
-
Posting here because I have a similar question and am uncertain how to handle it. I'm trying to incorporate SteamAudio into my project as a dependency. I have two ways of doing this: I could download the precompiled binaries or build it from source. Building from source would theoretically be the simplest if it weren't for the directory layout of the repository and how to build it. To build SteamAudio, the (traditional) way is to:
The problem, of course, is that all of this happens in the |
Beta Was this translation helpful? Give feedback.
No, nor to have
meson.build
somewhere other than the root of the project.I have a question in return: why isn't it in the project root?
...
A somewhat related question is, is the project root actually the project root?
What I mean by this is, there are projects where a cmake project is only part of the source tree, and the rest is unrelated code -- maybe it's a monorepo, maybe it is a library available in a variety of languages and the CMakeLists.txt is only in the cpp/ directory which is all you want. In such cases, the correct solution is probably to release a tarball for just the cmake project (and source code).
...
Given the actual directory structure
third_party/contrib/cmake/
it so…