apol added a comment.
How about pass it as a TARGET argument using CMakeParseArguments. You can see documentation about it here: https://cmake.org/cmake/help/latest/command/cmake_parse_arguments.html +1 to the change, I really dislike using variables for this. REPOSITORY R240 Extra CMake Modules REVISION DETAIL https://phabricator.kde.org/D22699 To: daandemeyer, alexmerry Cc: apol, kde-frameworks-devel, kde-buildsystem, LeGast00n, sbergeron, bencreasy, michaelh, ngraham, bruns