Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(conan-io#23500) libglvnd: Set the default datadir appropriately for …
…the system Currently, ICD discovery doesn't work properly for the system. This is because `datadir` is either configured to the package directory for Conan versions before 1.64 and 2.2 or not set at all for later versions. When the datadir is not set, it results in the default search path for ICD discovery using /share/glvnd/egl_vendor.d, which is not correct for any platform. This is due to the empty `prefix`. This PR sets datadir to `/usr/share` on Linux, fixing the search path to include `/usr/share/glvnd/egl_vendor.d`. The `prefix` is not modified to avoid installing everything under `/usr` in the install step. On FreeBSD, the `datadir` is set to `/usr/local/share`, where I assume that the Mesa package's vendor configs are installed. I haven't confirmed this for FreeBSD. These changes can be verified by checking the generated `compile_commands.json` file in the build directory. The value for `-DDEFAULT_EGL_VENDOR_CONFIG_DIRS=` will include the default search paths that libglvnd is built with. The first path which is under `sysconfigdir`, should be correct for Linux, as it is `/etc`. Under FreeBSD, this should be `/usr/local/etc`.
- Loading branch information