diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-06-05 14:28:31 +0200 |
---|---|---|
committer | Kevin Funk <kevin.funk@kdab.com> | 2019-06-05 12:30:47 +0000 |
commit | ace549587073d387823815b02ec85a28da408844 (patch) | |
tree | 0e0ff29a17b62ded3086ba5560c2dfc4838b2e45 /cmake/FindWrapRt.cmake | |
parent | 37467028bb07c14311ac2cf9741c274d5b44b388 (diff) |
Fix a few of the Wrap modules to protect against double creation of
targets. This created issues when trying to build standalone examples.
Change-Id: Iaaea2b537793ae25fbf3143cc205574446aa4ad1
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
Diffstat (limited to 'cmake/FindWrapRt.cmake')
-rw-r--r-- | cmake/FindWrapRt.cmake | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cmake/FindWrapRt.cmake b/cmake/FindWrapRt.cmake index ef5475c53d..d14b922062 100644 --- a/cmake/FindWrapRt.cmake +++ b/cmake/FindWrapRt.cmake @@ -1,3 +1,10 @@ +# We can't create the same interface imported target multiple times, CMake will complain if we do +# that. This can happen if the find_package call is done in multiple different subdirectories. +if(TARGET WrapRt) + set(WrapRt_FOUND ON) + return() +endif() + include(CheckCXXSourceCompiles) include(CMakePushCheckState) |