From 5b47af7b79cfc4284ea6dba3a0a10541095b84b2 Mon Sep 17 00:00:00 2001
From: Christine Kim <chkim@usgs.gov>
Date: Mon, 25 Sep 2023 12:44:58 -0700
Subject: [PATCH] Add cereal cmake

---
 cmake/FindCereal.cmake | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 cmake/FindCereal.cmake

diff --git a/cmake/FindCereal.cmake b/cmake/FindCereal.cmake
new file mode 100644
index 0000000..045c20e
--- /dev/null
+++ b/cmake/FindCereal.cmake
@@ -0,0 +1,21 @@
+# CMake module for find_package(CEREAL)
+# Finds include directory and all applicable libraries
+
+# This sets the following variables:
+# CEREAL_FOUND - True if Cereal was found.
+# CEREAL_INCLUDE_DIRS - Directories containing the Cereal include files.
+# CEREAL_DEFINITIONS - Compiler flags for Cereal.
+
+find_path(CEREAL_INCLUDE_DIR cereal
+        HINTS "${CEREAL_ROOT}/include" "$ENV{CEREAL_ROOT}/include" "/usr/include" "$ENV{PROGRAMFILES}/cereal/include" "cereal/include")
+
+set(CEREAL_INCLUDE_DIRS ${CEREAL_INCLUDE_DIR})
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(Cereal DEFAULT_MSG CEREAL_INCLUDE_DIR)
+
+mark_as_advanced(CEREAL_INCLUDE_DIR)
+
+if(CEREAL_FOUND)
+    message(STATUS "Cereal found (include: ${CEREAL_INCLUDE_DIRS})")
+endif(CEREAL_FOUND)
-- 
GitLab