hyprwm / hyprlang

The official implementation library for the hypr config language.
https://wiki.hyprland.org/Hypr-Ecosystem/hyprlang/
GNU Lesser General Public License v3.0
137 stars 16 forks source link

Empty path in `Cflags` in pkg-config file #11

Closed jbeich closed 10 months ago

jbeich commented 10 months ago

Regressed by db5e1399b90d due to using CMAKE_INSTALL_INCLUDEDIR without include(GNUInstallDirs). Also, without _FULL infix CMAKE_INSTALL_INCLUDEDIR expands to -Iinclude (relative path) which is still unusable via pkg-config.

$ cmake -G Ninja -DCMAKE_INSTALL_PREFIX:PATH=/tmp/hyprlang_prefix -B /tmp/hyprlang_build
$ cmake --build /tmp/hyprlang_build 
$ cmake --install /tmp/hyprlang_build
$ PKG_CONFIG_PATH=/tmp/hyprlang_prefix/share/pkgconfig pkg-config --cflags hyprlang
-I
$ fgrep includedir /tmp/hyprlang_prefix/share/pkgconfig/hyprlang.pc
includedir=
Cflags: -I${includedir}

breaking xdg-desktop-portal-hyprland v1.3.0 on FreeBSD:

/usr/bin/clang++ ... -I -I/usr/local/include/libdrm ...

In file included from ../src/portals/Screenshot.cpp:2:
In file included from ../src/portals/../core/PortalManager.hpp:14:
/usr/local/include/xf86drm.h:40:10: fatal error: 'drm.h' file not found
#include <drm.h>
         ^~~~~~~
vaxerski commented 10 months ago

@fufexan

fufexan commented 10 months ago

@jbeich can you test with https://github.com/hyprwm/hyprlang/commit/4c28464a7d7af69b8da2fbbf4ec0b5ef4e960054?

jbeich commented 10 months ago

I confirm, works fine now.