summaryrefslogtreecommitdiffstats
path: root/cmake/FindWrapDoubleConversion.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/FindWrapDoubleConversion.cmake')
-rw-r--r--cmake/FindWrapDoubleConversion.cmake7
1 files changed, 7 insertions, 0 deletions
diff --git a/cmake/FindWrapDoubleConversion.cmake b/cmake/FindWrapDoubleConversion.cmake
index 1164f6ba44..9c804a3eec 100644
--- a/cmake/FindWrapDoubleConversion.cmake
+++ b/cmake/FindWrapDoubleConversion.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 WrapDoubleConversion::WrapDoubleConversion)
+ set(WrapDoubleConversion_FOUND ON)
+ return()
+endif()
+
add_library(WrapDoubleConversion::WrapDoubleConversion INTERFACE IMPORTED)
find_package(double-conversion)