Skip to content

Prohibit manually built paths that point in srcdir in include_directo… #1386

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 17, 2017

Conversation

jpakkane
Copy link
Member

…ries and give information on what to use instead.


After this incdir will contain both the current source dir as well as the
corresponding build dir. It can then be used in any subdirectory and
Meson will take care of all the busywork to make paths work.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should also mention here that you can use any relative path to any subdirectory otherwise people will think they have to create meson.build files in directories that only contain headers just to get that value set.

…ries and give information on what to use instead.
@jpakkane jpakkane merged commit 28353e1 into master Feb 17, 2017
@jpakkane jpakkane deleted the nosrcabs branch February 17, 2017 20:42
@ePirat
Copy link
Contributor

ePirat commented Dec 15, 2022

@jpakkane This came around to bite me in VLC, where I pass a path that I get from a cross/native file which can end up pointing in the source dir (depending where users decide to do things) and would error out…

Is there any reason meson can not just make the path relative itself, maybe guarded behind an allow_absolute_to_srcdir kwarg or so? I can not even easily work around this as #7908 is not merged yet, but even if it were it still feels a bit like meson is second-guessing me here.

Or, just do the check in include_directories() which is frequently used to refer to relative directories in the source tree, but not do it when a string is given directly.

@dcbaker
Copy link
Member

dcbaker commented Dec 16, 2022

Why do you need to pass include_paths in the native/cross file? Is it because you need a dependency that meson can't find?

@ePirat
Copy link
Contributor

ePirat commented Dec 16, 2022

@dcbaker It's just so that I can cover some edge cases where I need to search for headers in the include dir and cover some cases that need the proper include path for our prebuilt deps without having any explicit dependency on anything in there.

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.

4 participants