From 962998ad27e9f2fc9b165a271f1d47d7e4f997e2 Mon Sep 17 00:00:00 2001 From: Montel Laurent Date: Thu, 14 Dec 2017 07:13:58 +0100 Subject: Remove cmake warning about generating moc file Test Plan: compile kmail without cmake warning Reviewers: kfunk, dfaure Reviewed By: kfunk Subscribers: mpyne, apol, aacid, #frameworks Tags: #frameworks Differential Revision: https://phabricator.kde.org/D9277 --- KF5ConfigMacros.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/KF5ConfigMacros.cmake b/KF5ConfigMacros.cmake index 527054da..b12723f7 100644 --- a/KF5ConfigMacros.cmake +++ b/KF5ConfigMacros.cmake @@ -95,11 +95,12 @@ function (KCONFIG_ADD_KCFG_FILES _sources ) MAIN_DEPENDENCY ${_tmp_FILE} DEPENDS ${_kcfg_FILE}) + set_source_files_properties(${_header_FILE} PROPERTIES SKIP_AUTOMOC ON) # don't run automoc on this file + set_source_files_properties(${_src_FILE} PROPERTIES SKIP_AUTOMOC ON) # don't run automoc on this file + if(ARG_GENERATE_MOC) list(APPEND sources ${_moc_FILE}) qt5_generate_moc(${_header_FILE} ${_moc_FILE}) - set_property(SOURCE ${_header_FILE} PROPERTY SKIP_AUTOMOC TRUE) # don't run automoc on this file - set_property(SOURCE ${_src_FILE} PROPERTY SKIP_AUTOMOC TRUE) # don't run automoc on this file set_property(SOURCE ${_src_FILE} APPEND PROPERTY OBJECT_DEPENDS ${_moc_FILE} ) endif() -- cgit v1.2.1