From b279a86032a2068e219cada5eccd10bf0f93445d Mon Sep 17 00:00:00 2001
From: Patrick Nonn <patrick.nonn@desy.de>
Date: Wed, 18 Jan 2023 17:44:16 +0100
Subject: [PATCH] Added FindlibYajl.cmake script

---
 cmake/Modules/FindlibYajl.cmake | 34 +++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 cmake/Modules/FindlibYajl.cmake

diff --git a/cmake/Modules/FindlibYajl.cmake b/cmake/Modules/FindlibYajl.cmake
new file mode 100644
index 0000000..fc10244
--- /dev/null
+++ b/cmake/Modules/FindlibYajl.cmake
@@ -0,0 +1,34 @@
+#######################################################################################################################
+#
+# cmake module for finding the yajl library
+#
+# returns:
+#   libYajl_FOUND       : true or false, depending on whether the package was found
+#   libYajl_LIBRARY     : path to the library
+# @author Patrick Nonn, DESY
+#
+#######################################################################################################################
+
+#######################################################################################################################
+#
+# IMPORTANT NOTE:
+#
+# DO NOT MODIFY THIS FILE inside a project. Instead update the project-template repository and pull the change from
+# there. Make sure to keep the file generic, since it will be used by other projects, too.
+#
+# If you have modified this file inside a project despite this warning, make sure to cherry-pick all your changes
+# into the project-template repository immediately.
+#
+#######################################################################################################################
+
+set(libYajl_FOUND 0)
+
+find_library(libYajl_LIBRARY
+    NAMES yajl yajl.so libyajl.so
+    PATHS /usr/lib /usr/lib32 /usr/lib64 /usr/local/lib
+    HINTS ${CMAKE_INSTALL_LIBDIR}
+)
+
+# use a macro provided by CMake to check if all the listed arguments are valid and set Yajl_FOUND accordingly
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(libYajl REQUIRED_VARS libYajl_LIBRARY)
-- 
GitLab