Diffusion KI18n 8f84d19aad04

Support passing target to ki18n_wrap_ui macro

Authored by daandemeyer on Aug 5 2019, 9:21 PM.

Description

Support passing target to ki18n_wrap_ui macro

Summary: Modern CMake encourages using targets as much as possible instead of macros. This patch makes it possible to pass a target to ki18n_wrap_ui. Instead of adding the resulting header to the list of sources, the header is added directly to the target's sources using the target_sources command which was added in CMake 3.1. Specific usage of this functionality is as a result also guarded by a call to cmake_minimum_required. The change is backwards compatible and allows projects to move over incrementally to passing targets to ki18n_wrap_ui instead of source lists.

Test Plan: Tested by running Kate's cmake scripts with the new macro with a single usage replaced by a target instead of a source list. Both the source lists usages and the target usage succeeded without errors and the resulting header was successfully added to the target's source list.

Reviewers: ilic

Reviewed By: ilic

Subscribers: ltoscano, alexmerry, turbov, cgiboudeaux, kde-frameworks-devel

Tags: Frameworks

Differential Revision: https://phabricator.kde.org/D22698

Details

Committed
aacidAug 5 2019, 9:22 PM
Reviewer
ilic
Differential Revision
D22698: Support passing target to ki18n_wrap_ui macro
Parents
R249:c83e52dd2bd3: GIT_SILENT Upgrade ECM and KF5 version requirements for 5.61.0 release.
Branches
Unknown
Tags
Unknown