summaryrefslogtreecommitdiffstats
path: root/cmake/FindSlog2.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/FindSlog2.cmake')
-rw-r--r--cmake/FindSlog2.cmake4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmake/FindSlog2.cmake b/cmake/FindSlog2.cmake
index 807ab6b12a..1e3e264816 100644
--- a/cmake/FindSlog2.cmake
+++ b/cmake/FindSlog2.cmake
@@ -1,6 +1,10 @@
# Find the Slog2 library
# Will make the target Slog2::Slog2 available when found.
+if(TARGET Slog2::Slog2)
+ set(Slog2_FOUND TRUE)
+ return()
+endif()
find_library(Slog2_LIBRARY NAMES "slog2")
find_path(Slog2_INCLUDE_DIR NAMES "sys/slog2.h" DOC "The Slog2 Include path")