From ea1af05f34d876f31ba3eee27387ad1da157c817 Mon Sep 17 00:00:00 2001
From: lintao <lintao51@gmail.com>
Date: Mon, 11 May 2020 14:43:24 +0800
Subject: [PATCH] WIP: Add K4FWCore in the cmake lists.

---
 Examples/CMakeLists.txt                  | 5 +++--
 Generator/CMakeLists.txt                 | 8 ++++++--
 Reconstruction/Digitisers/CMakeLists.txt | 5 +++--
 3 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/Examples/CMakeLists.txt b/Examples/CMakeLists.txt
index f21828bd..927eced8 100644
--- a/Examples/CMakeLists.txt
+++ b/Examples/CMakeLists.txt
@@ -5,6 +5,7 @@ find_package(podio REQUIRED)
 find_package(plcio REQUIRED)
 find_package(LCIO REQUIRED)
 find_package(EDM4HEP REQUIRED)
+find_package(K4FWCore REQUIRED)
 
 set(Examples_srcs
     src/HelloWorld/*.cpp
@@ -20,8 +21,8 @@ gaudi_install_headers(Examples)
 
 # Modules
 gaudi_add_module(Examples ${Examples_srcs}
-    INCLUDE_DIRS GaudiKernel FWCore ${plcio_INCLUDE_DIRS} ${podio_INCLUDE_DIRS} ${LCIO_INCLUDE_DIRS}
-    LINK_LIBRARIES GaudiKernel FWCore ${podio_LIBRARIES} ${LCIO_LIBRARIES} $ENV{PLCIO}/lib/libplcio.so 
+    INCLUDE_DIRS K4FWCore GaudiAlgLib GaudiKernel  ${plcio_INCLUDE_DIRS} ${podio_INCLUDE_DIRS} ${LCIO_INCLUDE_DIRS}
+    LINK_LIBRARIES K4FWCore GaudiAlgLib GaudiKernel ${podio_LIBRARIES} ${LCIO_LIBRARIES} $ENV{PLCIO}/lib/libplcio.so 
       EDM4HEP::edm4hep EDM4HEP::edm4hepDict
 )
 
diff --git a/Generator/CMakeLists.txt b/Generator/CMakeLists.txt
index 3996ab2b..41f325ec 100644
--- a/Generator/CMakeLists.txt
+++ b/Generator/CMakeLists.txt
@@ -24,6 +24,8 @@ find_package(podio)
 find_package(EDM4HEP)
 find_package(HepMC)
 find_package(CLHEP)
+find_package(K4FWCore REQUIRED)
+
 if(ROOT_FOUND)
     message("found ROOT: ${ROOT_INCLUDE_DIRS} ${ROOT_LIBRARIES}")
 endif(ROOT_FOUND)
@@ -44,12 +46,14 @@ INCLUDE_DIRECTORIES(${GenAlgo_incs})
 
 gaudi_add_module(GenAlgo ${GenAlgo_srcs} 
   INCLUDE_DIRS 
-    FWCore
+    K4FWCore
   LINK_LIBRARIES 
     ROOT
-    FWCore 
+    K4FWCore 
+    GaudiAlgLib GaudiKernel
     HepMC
     CLHEP
+    LCIO
     EDM4HEP::edm4hep EDM4HEP::edm4hepDict
   )
 #gaudi_add_test(Reader FRAMEWORK options/read.py)
diff --git a/Reconstruction/Digitisers/CMakeLists.txt b/Reconstruction/Digitisers/CMakeLists.txt
index 53a0b913..7c0c14ea 100644
--- a/Reconstruction/Digitisers/CMakeLists.txt
+++ b/Reconstruction/Digitisers/CMakeLists.txt
@@ -5,6 +5,7 @@ find_package(GEAR REQUIRED)
 find_package(GSL REQUIRED ) 
 find_package(LCIO REQUIRED ) 
 find_package(podio REQUIRED ) 
+find_package(K4FWCore REQUIRED)
 
 gaudi_depends_on_subdirs(
     Service/GearSvc
@@ -17,6 +18,6 @@ set(Digitisers_srcs
 
 # Modules
 gaudi_add_module(Digitisers ${Digitisers_srcs}
-    INCLUDE_DIRS GaudiKernel FWCore CLHEP gear ${plcio_INCLUDE_DIRS} ${GSL_INCLUDE_DIRS} ${LCIO_INCLUDE_DIRS}
-    LINK_LIBRARIES GaudiKernel FWCore CLHEP $ENV{GEAR}/lib/libgearsurf.so ${GSL_LIBRARIES} $ENV{PLCIO}/lib/libplcio.so ${LCIO_LIBRARIES}
+    INCLUDE_DIRS K4FWCore GaudiKernel GaudiAlgLib CLHEP gear ${plcio_INCLUDE_DIRS} ${GSL_INCLUDE_DIRS} ${LCIO_INCLUDE_DIRS}
+    LINK_LIBRARIES K4FWCore GaudiKernel GaudiAlgLib CLHEP $ENV{GEAR}/lib/libgearsurf.so ${GSL_LIBRARIES} $ENV{PLCIO}/lib/libplcio.so ${LCIO_LIBRARIES}
 )
-- 
GitLab