summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCristian Adam <cristian.adam@qt.io>2020-08-18 16:13:22 +0200
committerCristian Adam <cristian.adam@qt.io>2020-08-19 12:46:10 +0200
commit7e10dcb1d4ebd329957e3f4454378870e9d1670d (patch)
treec1a0f4b3b4edd0535bcfeb2697a84fce19142308
parent1b802c41eb3cc006ac060aec3e8c47eb8a0f4e40 (diff)
CMake Build: Add include guards for FindPPS.cmake and FindSlog2.cmake
The CMake configure process fails without include guards for these two find modules on QNX. Task-number: QTBUG-83202 Change-Id: I3cc589f98bc3b6b22c401421927ee6dab2663fb7 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
-rw-r--r--cmake/FindPPS.cmake4
-rw-r--r--cmake/FindSlog2.cmake4
2 files changed, 8 insertions, 0 deletions
diff --git a/cmake/FindPPS.cmake b/cmake/FindPPS.cmake
index c3360fa82c..fdcc87fa37 100644
--- a/cmake/FindPPS.cmake
+++ b/cmake/FindPPS.cmake
@@ -1,6 +1,10 @@
# Find the PPS library
# Will make the target PPS::PPS available when found.
+if(TARGET PPS::PPS)
+ set(PPS_FOUND TRUE)
+ return()
+endif()
find_library(PPS_LIBRARY NAMES "pps")
find_path(PPS_INCLUDE_DIR NAMES "sys/pps.h" DOC "The PPS Include path")
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")