diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2021-08-11 10:02:10 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@qt.io> | 2021-08-17 07:33:54 +0200 |
commit | 265d48f688b4169e60055b15702a90eb54262298 (patch) | |
tree | 944e0653e95a08a773d8146438819586809688a7 /src/3rdparty/freetype/include/freetype/config/integer-types.h | |
parent | cc249cc1165f5f572b08e68ef256737b3ee64a4f (diff) |
CMake: Prevent multiple creation of the targets 'aab' and 'apk'
Suppose you have a project with multiple subdirectories. In the
subdirectories are find_package calls for Qt, but not in the top-level
file.
Example:
- CMakeLists.txt
- subdir1/CMakeLists.txt
find_package(Qt5 COMPONENTS Core)
- subdir2/CMakeLists.txt
find_package(Qt5 COMPONENTS Core)
Both find_package calls are local to their subdirectories, which means
that the second find_package is executed, even though the first was
already successful. Both calls try to create the targets 'apk' and
'aab'. This leads to the following CMake error:
add_custom_target cannot create target "apk" because another target
with the same name already exists.
Guard the add_custom_target calls such that they do not create a target
if it is already existent.
Fixes: QTBUG-87863
Change-Id: I132b0c7d9db9b2cb33b5e091cf0b216f06cd0d39
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'src/3rdparty/freetype/include/freetype/config/integer-types.h')
0 files changed, 0 insertions, 0 deletions