From 63b40961cf21af4b7bf842f7a76d0d7dacde571a Mon Sep 17 00:00:00 2001
From: Florian Uhlig <f.uhlig@gsi.de>
Date: Wed, 2 Jun 2021 12:05:44 +0200
Subject: [PATCH] Fix build system for macosx 11.4

Limit the linking to the necessary ROOT libraries.
When linking agains all ROOT libraries defiened in the cmake variable
ROOT_LIBRARIES a link error occured on macosx 11.4 since the freetype
library wasn't found. It turned out that only 2 or 3 ROOT libraries are
really needed to properly link the executables.
---
 core/data/test/CMakeLists.txt     | 7 ++++---
 core/data/test/psd/CMakeLists.txt | 3 ++-
 core/data/test/trd/CMakeLists.txt | 3 ++-
 3 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/core/data/test/CMakeLists.txt b/core/data/test/CMakeLists.txt
index cfac7db73d..8e1df2b63c 100644
--- a/core/data/test/CMakeLists.txt
+++ b/core/data/test/CMakeLists.txt
@@ -42,7 +42,9 @@ Set(LINK_DIRECTORIES
 
 
 Set(DEPENDENCIES
-  ${ROOT_LIBRARIES}
+  Core
+  Matrix
+  Physics
   ${GTEST_BOTH_LIBRARIES}
   FairTools
   CbmData
@@ -52,8 +54,7 @@ Set(DEPENDENCIES
   MbsAPI
 )
 
-Set(SPECIAL_DEPENDENCIES
-  ${ROOT_LIBRARIES} 
+set(SPECIAL_DEPENDENCIES
   ${GTEST_BOTH_LIBRARIES}
   FairTools
 )
diff --git a/core/data/test/psd/CMakeLists.txt b/core/data/test/psd/CMakeLists.txt
index db9e7061bd..da3af12e45 100644
--- a/core/data/test/psd/CMakeLists.txt
+++ b/core/data/test/psd/CMakeLists.txt
@@ -15,7 +15,8 @@ Set(LINK_DIRECTORIES
 
 
 Set(DEPENDENCIES
-  ${ROOT_LIBRARIES}
+  Core
+  Physics
   ${GTEST_BOTH_LIBRARIES}
   FairTools
   CbmData
diff --git a/core/data/test/trd/CMakeLists.txt b/core/data/test/trd/CMakeLists.txt
index f036e8aabd..0586221e4b 100644
--- a/core/data/test/trd/CMakeLists.txt
+++ b/core/data/test/trd/CMakeLists.txt
@@ -15,7 +15,8 @@ Set(LINK_DIRECTORIES
 
 
 Set(DEPENDENCIES
-  ${ROOT_LIBRARIES}
+  Core
+  Physics
   ${GTEST_BOTH_LIBRARIES}
   FairTools
   CbmData
-- 
GitLab