Skip to content

Conversation

@amirmasoudabdol
Copy link

There is no mention of meson-src anywhere in the example, and the way the project is prepared, it'll not be created either. In addition, if we are already traversing to the build folder, we can drop the -C in meson compile call, and also run the executable directly.

There is no mention of `meson-src` anywhere in the example, and the way
the project is prepared, it'll not be created either. In addition, if we
are already traversing to the build folder, we can drop the `-C` in
`meson compile` call, and also run the executable directly.
@CLAassistant
Copy link

CLAassistant commented Nov 11, 2025

CLA assistant check
All committers have signed the CLA.

@ErniGH
Copy link
Contributor

ErniGH commented Nov 12, 2025

Hi, thanks for your PR. In the example, the meson-src folder is used as the build directory, this is a good practice. The idea is to separate the files generated by Conan from those generated by Meson after compilation.

I’ve tested the example from the documentation locally, and it works for me. I’m running it on macOS, but it’s possible we might be seeing an error on other systems. You mentioned that the meson-src folder isn’t being created, it should be generated during the step

meson setup --native-file conan_meson_native.ini .. meson-src

Could you please give me more information what system are you using, or what output are you expecting?
The final directory structure should look something like the image below:
Screenshot 2025-11-12 at 11 34 41

@amirmasoudabdol
Copy link
Author

Hi @ErniGH, thanks for your reply and double-checking it! I guess I am still getting used to meson and a bit confused coming from CMake. You are indeed right, this is working, and I have no idea what I did wrong that I ran into an issue. Sorry for the confusion.

Please feel free to close the ticket, or if you think there is room for improvement/clarification, I can still change this PR for that purpose! 😊

E.g., adding a version of your comment:

In the example, the meson-src folder is used as the build directory, this is a good practice. The idea is to separate the files generated by Conan from those generated by Meson after compilation.

Or, perhaps renaming it to meson-build instead of meson-src. I think this was part of a confusion for me, as in, I thought we are trying to point to the source, and I thought, but there is no source called meson-src.

@ErniGH
Copy link
Contributor

ErniGH commented Nov 12, 2025

@amirmasoudabdol sure! Change it to meson-build in this PR, and we can move it forward. This way, we can hopefully help avoid any future errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants