From e0958f5ce66d1caa82efac6c34cf030e071cd037 Mon Sep 17 00:00:00 2001
From: Florian Uhlig <f.uhlig@gsi.de>
Date: Thu, 24 Jun 2021 12:50:58 +0200
Subject: [PATCH] Fix a linker issue for macosx 11

Somehow /usr/loacl/lib isn'T any longer in the default link path such that
libfreetype isn't found.
---
 sim/transport/steer/CMakeLists.txt | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/sim/transport/steer/CMakeLists.txt b/sim/transport/steer/CMakeLists.txt
index 14620992b9..45856dd6cd 100644
--- a/sim/transport/steer/CMakeLists.txt
+++ b/sim/transport/steer/CMakeLists.txt
@@ -54,6 +54,14 @@ ${Vc_LIB_DIR}
 ${KFParticle_LIB_DIR}
 ${SIMPATH}/lib
 )
+
+# Work around linker problems on macosx 11 (Big Sur)
+# Somehow libfreetype isn't properly found in /usr/local/lib
+cmake_host_system_information(RESULT _OS_RELEASE QUERY OS_RELEASE)
+if(APPLE AND ${_OS_RELEASE} VERSION_GREATER 11)
+  Message(STATUS "Fixing linker issue on macosx ${_OS_RELEASE}")
+  list(APPEND LINK_DIRECTORIES /usr/local/lib)
+endif()
 # ---------------------------------------------------------
 
 
-- 
GitLab