Missing include directory in pkg-config breaks API
jbeich opened this issue · 1 comments
jbeich commented
Describe the bug
Regressed by 34af39f. Incorrect -I
flags may be fatal on BSDs, NixPkgs or anything using non-default prefix.
As Vulkan-Headers currently doesn't provide pkg-config file consumers expect vulkan.pc to cover both Vulkan-Loader and Vulkan-Headers. To mimic CMake vulkan.pc can be split into vulkan-headers.pc and vulkan-loader.pc where vulkan.pc (reduced to Requires: vulkan-headers vulkan-loader
) is kept for backward compatibility.
Environment:
- OS: FreeBSD
- Bitdepth: 64-bit
- GPU: Intel Skylake GT2
- Graphics Driver: ANV 23.3
- Vulkan-Headers: 1.3.267 (system package)
- Enabled layers: none
To Reproduce
$ cmake -DCMAKE_INSTALL_PREFIX:PATH=/tmp/vulkan-loader_prefix -B /tmp/vulkan-loader_build
$ cmake --build /tmp/vulkan-loader_build
$ cmake --install /tmp/vulkan-loader_build
$ export PKG_CONFIG_LIBDIR=/tmp/vulkan-loader_prefix/lib/pkgconfig
$ pkg-config --cflags vulkan
(empty)
$ echo '#include <vulkan/vulkan.h>' | cc -o/dev/null -xc -c - $(pkg-config --cflags vulkan)
<stdin>:1:10: fatal error: 'vulkan/vulkan.h' file not found
1 | #include <vulkan/vulkan.h>
| ^~~~~~~~~~~~~~~~~
1 error generated.
$ cat $PKG_CONFIG_LIBDIR/vulkan.pc
Name: Vulkan-Loader
Description: Vulkan Loader
Version: 1.3.267
Libs: -Llib -lvulkan
jbeich commented
Related breakage but regressed by d9faa0f instead:
$ pkg-config --variable=includedir vulkan
(empty)
$ git clone https://github.com/vkmark/vkmark
$ cd vkmark
$ meson setup _build
[...]
WARNING: pkgconfig variable 'includedir' not defined for dependency vulkan.
src/meson.build:9:19: ERROR: File vulkan/vulkan.hpp does not exist.