--- dependencies/lib-sol2/CMakeLists.txt.orig	2021-04-23 09:23:24 UTC
+++ dependencies/lib-sol2/CMakeLists.txt
@@ -1,5 +1,20 @@
 # \file dependencies/lib-sol2/CMakeLists.txt
 
+option(LOCAL_SOL_LIB "Download and build Sol2 instead of searching the system" ON)
+if (NOT LOCAL_SOL_LIB)
+    message(STATUS "Using system Sol2")
+    find_package(sol2 "3.2.2"
+        REQUIRED
+        PATH_SUFFIXES lib/cmake/sol2 # path to sol2-config.cmake
+    )
+    if (NOT sol2_FOUND)
+        message(FATAL_ERROR "Sol2 not found")
+    endif()
+
+    set(SOL_INCLUDE_DIR "${SOL2_INCLUDE_DIRS}" PARENT_SCOPE)
+    return()
+endif()
+
 message(STATUS "<sol2>")
 
 # create getter
