Skip to content

Commit 5d88cc4

Browse files
committed
M9.R.15q.6.5: kwin global -isystem flags for libwayland + Qt6 headers
The cmake build phase failed because specific kwin sub-targets (killer, aurorae decorations, kpackage plugins) compile auto-generated <protocol>-protocol.c sources whose #include 'wayland-util.h' is not on the target's per-CMakeLists -I list. Root cause: kwin's upstream src/helpers/killer/CMakeLists.txt declares target_link_libraries(kwin_killer_helper Qt::WaylandClient ...) but NOT Wayland::Client; Qt's qt6_generate_wayland_protocol_client_sources adds the .c source but does not propagate the libwayland include path. Stop-gap: thread '-isystem <wayland>/include' + '-isystem <qt6-base>/ include' + '-isystem <qt6-declarative>/include' via CMAKE_C_FLAGS + CMAKE_CXX_FLAGS so EVERY target sees the missing headers. Upstream- correct fix is per-target target_include_directories but that requires patching kwin's source tree which is out of scope for this milestone.
1 parent 40f0ffa commit 5d88cc4

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

recipes/packages/source/kwin/repro.nim

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,22 @@ package kwinSource:
396396
## M9.R.5b — explicit `build:` block constructed from the lifted `config:` values + the inlined verbatim flags. Calls the M9.R.2b high-level `cmake_package(...)` constructor.
397397
setCurrentOwningPackageOverride("kwinSource")
398398
try:
399+
# M9.R.15q.6.5 — global -I flags for libwayland, libwayland-server
400+
# (used by Qt6's qt6_generate_wayland_protocol_client_sources auto-
401+
# generated <protocol>-protocol.c which #include's wayland-util.h)
402+
# and Qt6 prefix dirs used by some kwin sub-targets (killer, aurorae
403+
# plugins, kpackage plugins) whose CMakeLists do NOT add wayland-
404+
# client to target_link_libraries. Per-target target_include_dirs is
405+
# the upstream-correct fix but requires patching kwin's source;
406+
# plumbing the include via CMAKE_{C,CXX}_FLAGS is a stop-gap that
407+
# threads the include path globally without touching the recipe-eval
408+
# vendored source tree.
409+
let waylandInc = "/opt/repro/reprobuild/recipes/packages/source/wayland/.repro/output/install/usr/include"
410+
let qt6CoreInc = "/opt/repro/reprobuild/recipes/packages/source/qt6-base/.repro/output/install/usr/include"
411+
let qt6DeclInc = "/opt/repro/reprobuild/recipes/packages/source/qt6-declarative/.repro/output/install/usr/include"
412+
let globalIncFlags = "-isystem " & waylandInc &
413+
" -isystem " & qt6CoreInc &
414+
" -isystem " & qt6DeclInc
399415
let opts = @[
400416
"BUILD_TESTING=OFF",
401417
"KWIN_BUILD_TABBOX=OFF",
@@ -410,6 +426,9 @@ package kwinSource:
410426
"KWIN_BUILD_SCREENLOCKER=OFF",
411427
"KWIN_BUILD_RUNNERS=OFF",
412428
"CMAKE_BUILD_TYPE=Release",
429+
# M9.R.15q.6.5 — global -I flags for libwayland + Qt6 (see above).
430+
"CMAKE_C_FLAGS=" & globalIncFlags,
431+
"CMAKE_CXX_FLAGS=" & globalIncFlags,
413432
]
414433
# M9.R.15q.6.3 — explicit PKG_CONFIG_PATH_FOR_TARGET injection.
415434
#

0 commit comments

Comments
 (0)