From 3734a5368e44a3cef42faed41b0044679d16459d Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Fri, 17 Apr 2020 00:45:31 +0200 Subject: Fix wayland scanner warnings Summary: Tells cmake not to automoc certain files that don't need it, which would become a big fuss on the cmake output. Test Plan: No warnings Reviewers: #build_system, #kwin, #frameworks, davidedmundson Reviewed By: #kwin, davidedmundson Subscribers: kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D28900 --- find-modules/FindQtWaylandScanner.cmake | 5 +++++ find-modules/FindWaylandScanner.cmake | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'find-modules') diff --git a/find-modules/FindQtWaylandScanner.cmake b/find-modules/FindQtWaylandScanner.cmake index 0854d0fd..25c55ccb 100644 --- a/find-modules/FindQtWaylandScanner.cmake +++ b/find-modules/FindQtWaylandScanner.cmake @@ -138,6 +138,7 @@ function(ecm_add_qtwayland_client_protocol out_var) BASENAME ${ARGS_BASENAME}) get_filename_component(_infile ${ARGS_PROTOCOL} ABSOLUTE) + set(_ccode "${CMAKE_CURRENT_BINARY_DIR}/wayland-${ARGS_BASENAME}-client-protocol.c") set(_cheader "${CMAKE_CURRENT_BINARY_DIR}/wayland-${ARGS_BASENAME}-client-protocol.h") set(_header "${CMAKE_CURRENT_BINARY_DIR}/qwayland-${ARGS_BASENAME}.h") set(_code "${CMAKE_CURRENT_BINARY_DIR}/qwayland-${ARGS_BASENAME}.cpp") @@ -152,6 +153,8 @@ function(ecm_add_qtwayland_client_protocol out_var) COMMAND ${QtWaylandScanner_EXECUTABLE} client-code ${_infile} "" ${_prefix} > ${_code} DEPENDS ${_infile} ${_header} VERBATIM) + set_property(SOURCE ${_header} ${_code} ${_cheader} ${_ccode} PROPERTY SKIP_AUTOMOC ON) + list(APPEND ${out_var} "${_code}") set(${out_var} ${${out_var}} PARENT_SCOPE) endfunction() @@ -187,6 +190,8 @@ function(ecm_add_qtwayland_server_protocol out_var) COMMAND ${QtWaylandScanner_EXECUTABLE} server-code ${_infile} "" ${_prefix} > ${_code} DEPENDS ${_infile} ${_header} VERBATIM) + set_property(SOURCE ${_header} ${_code} PROPERTY SKIP_AUTOMOC ON) + list(APPEND ${out_var} "${_code}") set(${out_var} ${${out_var}} PARENT_SCOPE) endfunction() diff --git a/find-modules/FindWaylandScanner.cmake b/find-modules/FindWaylandScanner.cmake index ed9c4c4c..0f08f590 100644 --- a/find-modules/FindWaylandScanner.cmake +++ b/find-modules/FindWaylandScanner.cmake @@ -125,7 +125,7 @@ function(ecm_add_wayland_client_protocol out_var) set_source_files_properties(${_client_header} GENERATED) set_source_files_properties(${_code} GENERATED) - set_property(SOURCE ${_client_header} PROPERTY SKIP_AUTOMOC ON) + set_property(SOURCE ${_client_header} ${_code} PROPERTY SKIP_AUTOMOC ON) add_custom_command(OUTPUT "${_client_header}" COMMAND ${WaylandScanner_EXECUTABLE} client-header ${_infile} ${_client_header} -- cgit v1.2.1