Skip to content

Add "prefix name" to include shared library generated header #10256

Answered by eli-schwartz
ortegajosant asked this question in Q&A
Discussion options

You must be logged in to vote

I'm not sure I understand your goal?

In submodule_11/meson.build you can do incdir_11 = include_directories('include') and later use the incdir_11 variable in any target to enable #include <header_11.hpp>.

However, you cannot ever use #include <submodule_11/header_11.hpp> because the compiler itself will then look for a file named submodule_11/header_11.hpp and you must therefore have that exact filename including leading directory prefix on disk somewhere.

Meson doesn't care which one you use, it is the compiler itself which absolutely enforces this. So either you give up on having a directory prefix, or you actually create the directory prefix as part of your on-disk project structure.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ortegajosant
Comment options

Answer selected by ortegajosant
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants