Happys new year
I have tested with xcb-proto.pc, which contains:
prefix=/opt/xcb
exec_prefix=${prefix}
datarootdir=${prefix}/share
datadir=${datarootdir}
xcbincludedir=${pc_sysrootdir}${datadir}/xcb
PYTHON_PREFIX=${prefix}
pythondir=${pc_sysrootdir}${PYTHON_PREFIX}/lib/python3.12/site-packages
Name: XCB Proto
Description: X protocol descriptions for XCB
Version: 1.17.0
the behavior of pkgconf when I retrieve the value of xcbincludedir, on Windows or Linux, is the same:
- if
PKG_CONFIG_SYSROOT_DIR is not set, pkgconf --variable=xcbincludedir= xcb-proto returns
- Linux:
//usr/share/xcb
- Windows:
/C:/Documents/msys2_2/opt/xcb/share/xcb
- if
PKG_CONFIG_SYSROOT_DIR is set to nothing, pkgconf --variable=xcbincludedir= xcb-proto returns
- Linux:
/usr/share/xcb
- Windows:
C:/Documents/msys2_2/opt/xcb/share/xcb
Now, with this meson.build test file:
project('test', 'c')
pkg_mod = import('pkgconfig')
xcbproto = dependency('xcb-proto', required: true, version: '>= 1.17.0')
xcbproto_inc_dir = xcbproto.get_variable(pkgconfig: 'xcbincludedir')
warning(xcbproto_inc_dir)
With meson, on Windows (I think it will be the same on Linux)
- if
PKG_CONFIG_SYSROOT_DIR is not set, meson setup build displays WARNING: /C:/Documents/msys2_2/opt/xcb/share/xcb
- if
PKG_CONFIG_SYSROOT_DIR is set to nothing, meson setup build displays WARNING: C:/Documents/msys2_2/opt/xcb/share/xcb
The behavior is consistent with what pkgconf returns
With muon git, on Windows (I think it will be the same on Linux)
- if
PKG_CONFIG_SYSROOT_DIR is not set, muon setup build displays warn //opt/xcb/share/xcbb
- if
PKG_CONFIG_SYSROOT_DIR is set to nothing, muon setup build displays warn //opt/xcb/share/xcb
So with muon:
/ is always prepended, contrary to what pkgconf returns
- /opt is not expanded
Happys new year
I have tested with xcb-proto.pc, which contains:
the behavior of pkgconf when I retrieve the value of xcbincludedir, on Windows or Linux, is the same:
PKG_CONFIG_SYSROOT_DIRis not set,pkgconf --variable=xcbincludedir= xcb-protoreturns//usr/share/xcb/C:/Documents/msys2_2/opt/xcb/share/xcbPKG_CONFIG_SYSROOT_DIRis set to nothing,pkgconf --variable=xcbincludedir= xcb-protoreturns/usr/share/xcbC:/Documents/msys2_2/opt/xcb/share/xcbNow, with this meson.build test file:
With meson, on Windows (I think it will be the same on Linux)
PKG_CONFIG_SYSROOT_DIRis not set,meson setup builddisplaysWARNING: /C:/Documents/msys2_2/opt/xcb/share/xcbPKG_CONFIG_SYSROOT_DIRis set to nothing,meson setup builddisplaysWARNING: C:/Documents/msys2_2/opt/xcb/share/xcbThe behavior is consistent with what pkgconf returns
With muon git, on Windows (I think it will be the same on Linux)
PKG_CONFIG_SYSROOT_DIRis not set,muon setup builddisplayswarn //opt/xcb/share/xcbbPKG_CONFIG_SYSROOT_DIRis set to nothing,muon setup builddisplayswarn //opt/xcb/share/xcbSo with muon:
/is always prepended, contrary to what pkgconf returns