From e7294d817add18a3b83c2054eb34ce27c4dac3e0 Mon Sep 17 00:00:00 2001
From: Jens Georg <jens.georg@desy.de>
Date: Tue, 24 Sep 2019 13:52:52 +0200
Subject: [PATCH] Use find_dependency instead of find_package

find_package is for use inside the *Config.cmake files
---
 cmake/create_cmake_config_files.cmake | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmake/create_cmake_config_files.cmake b/cmake/create_cmake_config_files.cmake
index 13fc78d..6b7910c 100644
--- a/cmake/create_cmake_config_files.cmake
+++ b/cmake/create_cmake_config_files.cmake
@@ -55,7 +55,7 @@ endforeach()
 
 set(${PROJECT_NAME}_PUBLIC_DEPENDENCIES_L "")
 foreach(DEPENDENCY ${${PROJECT_NAME}_PUBLIC_DEPENDENCIES})
-    string(APPEND ${PROJECT_NAME}_PUBLIC_DEPENDENCIES_L "find_package(${DEPENDENCY} REQUIRED)\n")
+    string(APPEND ${PROJECT_NAME}_PUBLIC_DEPENDENCIES_L "find_dependency(${DEPENDENCY})\n")
 endforeach()
 
 # we have nested @-statements, so we have to parse twice:
-- 
GitLab