summaryrefslogtreecommitdiffstats
path: root/cmake/FindWrapRt.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/FindWrapRt.cmake')
-rw-r--r--cmake/FindWrapRt.cmake7
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)