Closed JPeterMugaas closed 1 year ago
@microsoft-github-policy-service agree
@jenatali This PR causes problems when trying to use this repo as a VCPKG port. This now generates warnings from VCPKG:
warning: There should be no absolute paths, such as the following, in an installed package:
D:\vcpkg\packages\directx-headers_x64-windows
D:\vcpkg\installed
D:\vcpkg\buildtrees\directx-headers
D:\vcpkg\downloads
Absolute paths were found in the following files:
D:\vcpkg\packages\directx-headers_x64-windows\debug\lib\pkgconfig\DirectX-Headers.pc
D:\vcpkg\packages\directx-headers_x64-windows\lib\pkgconfig\DirectX-Headers.pc
error: Found 1 post-build check problem(s). To submit these ports to curated catalogs, please first correct the portfile: D:\vcpkg\ports\directx-headers\portfile.cmake
@jenatali This PR causes problems when trying to use this repo as a VCPKG port. This now generates warnings from VCPKG:
Can you try building the port with the included meson.build instead?
https://mesonbuild.com/Builtin-options.html#pkgconfig-module
Since 0.63.0 The
pkgconfig.relocatable
option is used by the pkgconfig module–namelypkg.generate()
–and affects how theprefix
(not to be confused with the install prefix) in the generated pkgconfig file is set. When it istrue
, theprefix
will be relative to theinstall_dir
-this allows the pkgconfig file to be moved around and still work, as long as the relative path is not broken. In general, this allows for the whole installed package to be placed anywhere on the system and still work as a dependency. When it is set tofalse
, theprefix
will be the same as the install prefix.
This is, in general, a hard problem to solve. Outside of vcpkg, for example in Linux distros, it is a bug if the paths are missing the important requirement of being absolute. Meson's generator attempts to cover a wide variety of situations fairly flexibly.
This fixes the two issues that I mentioned in https://github.com/microsoft/DirectX-Headers/issues/97 .