Silence AutoMoc for qplatformwindow_p.h on non-Wayland platforms

Wayland is the only platform that declares a native interface
that depends on QObject.

Amends 2acd0078598ed87a76b5ea66b042e8b096ac222f.

Change-Id: If625723e242f5cdb0b8972d90684eea7d86cfb14
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Tor Arne Vestbø 2025-04-09 13:05:37 +02:00
parent ecfa7406f1
commit 64e3629cdf

View File

@ -47,7 +47,7 @@ elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}
endif()
# Silence AUTOMOC warning 'No relevant classes found. No output generated.'
if (NOT UNIX)
if (NOT QT_FEATURE_wayland)
set_source_files_properties(kernel/qplatformwindow_p.h
PROPERTIES SKIP_AUTOMOC TRUE)
endif()