Skip to content

Find 'include' files from *not* meson project #12815

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

You must be logged in to vote

It sounds like your project structure is:

.
├── drivers-project
└── myproject

And potentially:

.
└── otherproject
    └── subprojects
        ├── drivers-project
        └── myproject

I would suggest making drivers-project into a "wrapped" meson project. Give it a really simple meson.build that simply produces a

drivers_dep = declare_dependency(include_directories: ['inc'])

and you can get it with drivers_dep = subproject('drivers-project').get_variable('drivers_dep') and use it as a dependency in elif compiler.has_header('drv/myheader.h', dependencies: drivers_dep).

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by MartinSchwarzbauer
Comment options

You must be logged in to vote
0 replies
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