From a93df568b6ebdd57a4932cdeb41d67248c5cfc7d Mon Sep 17 00:00:00 2001
From: Nicolas Werner <nicolas.werner@hotmail.de>
Date: Fri, 17 Jan 2020 21:54:00 +0100
Subject: [PATCH] Only search for libolm, if we don't bundle it

---
 CMakeLists.txt | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index f81f5dbaa..f60cada02 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -101,13 +101,14 @@ if(USE_BUNDLED_OLM)
 		GIT_TAG        3.1.4
 		)
 	FetchContent_MakeAvailable(Olm)
+else()
+	find_package(Olm 3)
+	set_package_properties(Olm PROPERTIES
+		DESCRIPTION "An implementation of the Double Ratchet cryptographic ratchet"
+		URL "https://git.matrix.org/git/olm/about/"
+		TYPE REQUIRED
+		)
 endif()
-find_package(Olm 3)
-set_package_properties(Olm PROPERTIES
-    DESCRIPTION "An implementation of the Double Ratchet cryptographic ratchet"
-    URL "https://git.matrix.org/git/olm/about/"
-    TYPE REQUIRED
-)
 
 if(USE_BUNDLED_SODIUM)
         hunter_add_package(libsodium)
-- 
GitLab