How to build subproject executable with cmake module? #10770
Unanswered
novafacing
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm a bit of a beginner with meson, but I couldn't find an answer on the docs or online.
I am using meson to build a bunch of cmake subprojects that build executables, not libraries. When I run
meson builddir
, cmake runs correctly butmeson compile
just says:ninja: no work to do
instead of building the configured cmake projects. I assume this is because I am not using the cmake build target anywhere, but I can't figure out how to tell meson "build this target".Below is my
meson.build
. I just have a dir withmeson.build
and a subdirsubprojects/AIS-Lite
that contains aCMakeLists.txt
that configures the subproject.What I expect to happen: I expect the AIS-Lite executable to be produced when I run
meson compile
.What actually happens:
builddir/subprojects/AIS-Lite/__CMake_build/
is produced, and runningninja
manually there produces the executable! But it is not produced by runningmeson compile
.meson.build:
Edit: The solution ended up being "don't use cmake at all" and I just converted the cmake subproject to meson. However, I didn't figure out how to do this so I'll leave the discussion open in case someone in the future figures it out to help others who may encounter this.
Beta Was this translation helpful? Give feedback.
All reactions