Skip to content

Fix Wayland_DATADIR when cross-compiling

PKG_CONFIG_SYSROOT_DIR only applies to -I and -L flags, so pkg-config does not prepend CMAKE_SYSROOT when cross-compiling unless you pass --define-prefix explicitly. Therefore we have to manually do prepend it here when cross-compiling. See https://gitlab.kitware.com/cmake/cmake/-/issues/16647#note_844761.

With this change I no longer get errors related to wayland.xml when cross-compiling KWaylandServer.

Merge request reports