mesonbuild / mesonbuild/meson

Support compile-only dependencies

Open
#7,516 10 comments 0 reactions 1 assignee Claimed by @dcbaker View on GitHub
bug dependencies
Dominant language
Python
Stars
6.6k
Forks
1.9k
Avg merge
2d 6h
Merged PRs (30d)
33

Description

I have a pkgconfig dependency for which I only need the headers - I do not want to link against the shared library. I tried to accomplish this with:

```
libfuse_dep = dependency('fuse3', version: '>=3.5.0')
fuse_headers = include_directories(libfuse_dep.get_pkgconfig_variable('includedir'))
# ...
executable('foo', 'foo.c', include_directories: [fuse_headers]
```

Unfortunately that did not work, the compile command did not include the include directory.

Bug or feature? I suspect that `include_directories` is not intended for absolute paths - but is there another solution?

```
$ meson --version
0.49.2
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.