From b259204e174cbcf39bf74e17454c370eb852c07a Mon Sep 17 00:00:00 2001
From: Dmitry Kalinkin <dkalinkin@bnl.gov>
Date: Wed, 29 May 2024 14:02:52 +0000
Subject: [PATCH] rich/CMakeLists.txt: compile library against spdlog

---
 benchmarks/rich/CMakeLists.txt | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/benchmarks/rich/CMakeLists.txt b/benchmarks/rich/CMakeLists.txt
index 9afbcef2..14aa9ad2 100644
--- a/benchmarks/rich/CMakeLists.txt
+++ b/benchmarks/rich/CMakeLists.txt
@@ -18,8 +18,8 @@ set(algo_exe benchmark_${det_name}_reconstruction)
 add_executable(${algo_exe} ${algo_exe_source})
 
 # linking
-target_link_libraries(${algo_exe}
-  ${algo_lib}
+target_link_libraries(${algo_lib}
+  PUBLIC
   ROOT::Core
   ROOT::Hist
   podio::podio
@@ -28,6 +28,10 @@ target_link_libraries(${algo_exe}
   EDM4HEP::edm4hep
   spdlog::spdlog
   )
+target_link_libraries(${algo_exe}
+  PRIVATE
+  ${algo_lib}
+  )
 
 # installation
 install(FILES ${algo_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${CMAKE_PROJECT_NAME}/${det_name})
-- 
GitLab