1From 54b1dbc550b3daa2a7834a9bfd73a0c2f8aeba6a Mon Sep 17 00:00:00 2001
2From: Even Rouault <even.rouault@spatialys.com>
3Date: Tue, 5 Jul 2022 19:40:53 +0200
4Subject: [PATCH] proj-config.cmake generation: only add find_dependency(CURL)
5 for static builds
6
7---
8 cmake/project-config.cmake.in | 12 ++++++++----
9 1 file changed, 8 insertions(+), 4 deletions(-)
10
11diff --git a/cmake/project-config.cmake.in b/cmake/project-config.cmake.in
12index 3f359668..db886396 100644
13--- a/cmake/project-config.cmake.in
14+++ b/cmake/project-config.cmake.in
15@@ -19,11 +19,15 @@ include(CMakeFindDependencyMacro)
16 # Cf https://gitlab.kitware.com/cmake/cmake/-/issues/17612
17 cmake_policy(PUSH)
18 cmake_policy(SET CMP0012 NEW)
19-if("@ENABLE_TIFF@")
20- set(PROJ_CONFIG_FIND_TIFF_DEP ON)
21+if(NOT "@BUILD_SHARED_LIBS@")
22+ if("@ENABLE_TIFF@")
23+ set(PROJ_CONFIG_FIND_TIFF_DEP ON)
24+ endif()
25 endif()
26-if("@CURL_ENABLED@")
27- set(PROJ_CONFIG_FIND_CURL_DEP ON)
28+if(NOT "@BUILD_SHARED_LIBS@")
29+ if("@CURL_ENABLED@")
30+ set(PROJ_CONFIG_FIND_CURL_DEP ON)
31+ endif()
32 endif()
33 cmake_policy(POP)
34
35--
362.41.0
37