f16a77d783
Initially we didn't do this because someone could accidentally create another target of a conflicting name, and used a variable to store whether we have created the target already or not. That wasn't adequeate to deal with finding the package in a scope like a function, so we used a directory property. However, the directory property is not valid in the same scopes as the defined target. For example, finding a Qt module in both a directory and a subdirectory causes a conflict. As it is already unlikely that a target would be accidentally created with a name like Qt5::Core, we should simply use the IF(TARGET) form. Change-Id: If64f25d45f51edcd1edb0d4bfb5ed3bb2479bd27 Reviewed-by: David Faure <faure@kde.org> |
||
---|---|---|
.. | ||
fail4 | ||
fail5 | ||
pass1 | ||
pass2 | ||
pass3 | ||
pass7 | ||
pass8 | ||
pass9 | ||
pass10 | ||
pass(needsquoting)6 | ||
cmake.pro | ||
CMakeLists.txt |