From 0dce2ce1a81019e8a41d5d9b55197d8cc535e52c Mon Sep 17 00:00:00 2001
From: Antoine Regimbeau <antoine.regimbeau@c-s.fr>
Date: Sun, 19 May 2019 13:28:16 +0200
Subject: [PATCH] Try to add LDFLAGS to gdal to allow packaging

---
 SuperBuild/CMake/External_gdal.cmake | 1 +
 1 file changed, 1 insertion(+)

diff --git a/SuperBuild/CMake/External_gdal.cmake b/SuperBuild/CMake/External_gdal.cmake
index 618ff71265..19824b51e3 100644
--- a/SuperBuild/CMake/External_gdal.cmake
+++ b/SuperBuild/CMake/External_gdal.cmake
@@ -52,6 +52,7 @@ if(UNIX)
   #we don't do any framework build on osx. So let's be sure on case of gdal
   if(APPLE)
     list(APPEND GDAL_SB_CONFIG "--with-macosx-framework=no")
+    list(APPEND GDAL_SB_CONFIG "LDFLAGS=-headerpad")
   endif()
 
   # PATCH_COMMAND ${CMAKE_COMMAND} -E touch ${GDAL_SB_SRC}/config.rpath
-- 
GitLab