From 2efee564d8cc86c686e6ab3daec0264eadb64172 Mon Sep 17 00:00:00 2001
From: Florian Uhlig <f.uhlig@gsi.de>
Date: Fri, 8 Oct 2021 13:52:05 +0200
Subject: [PATCH] Add new CbmOnlineData library

The new library currently only contains a ROOT free version of CbmStsDigi.
The code is still in core/data/sts. The class CbmStsDigi is currently compiled
twice. Once with ROOT dictionary an streamer in libCbmData and once without
any ROOT dependency in libCbmOnlineData. refs #2258
---
 CMakeLists.txt           |  1 +
 algo/CMakeLists.txt      |  1 +
 algo/data/CMakeLists.txt | 26 ++++++++++++++++++++++++++
 3 files changed, 28 insertions(+)
 create mode 100644 algo/CMakeLists.txt
 create mode 100644 algo/data/CMakeLists.txt

diff --git a/CMakeLists.txt b/CMakeLists.txt
index c61cd24f53..790ab5f093 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -382,6 +382,7 @@ endif()
 add_subdirectory (external)
 
 ### Base directories
+add_subdirectory (algo)
 add_subdirectory (core)
 add_subdirectory (sim)
 add_subdirectory (reco)
diff --git a/algo/CMakeLists.txt b/algo/CMakeLists.txt
new file mode 100644
index 0000000000..489eba06c8
--- /dev/null
+++ b/algo/CMakeLists.txt
@@ -0,0 +1 @@
+add_subdirectory (data)
diff --git a/algo/data/CMakeLists.txt b/algo/data/CMakeLists.txt
new file mode 100644
index 0000000000..817de8ab13
--- /dev/null
+++ b/algo/data/CMakeLists.txt
@@ -0,0 +1,26 @@
+# Create a library called "libCbmOnlineData" which includes the source files given in
+# the array .
+# The extension is already found.  Any number of sources could be listed here.
+
+set(INCLUDE_DIRECTORIES
+   ${CMAKE_SOURCE_DIR}/core/data
+   ${CMAKE_SOURCE_DIR}/core/data/sts
+)
+
+include_directories(${INCLUDE_DIRECTORIES})
+
+set(SYSTEM_INCLUDE_DIRECTORIES
+  ${Boost_INCLUDE_DIR}
+)
+
+include_directories(SYSTEM ${SYSTEM_INCLUDE_DIRECTORIES})
+
+set(SRCS
+  ${CMAKE_SOURCE_DIR}/core/data/sts/CbmStsDigi.cxx
+)
+
+
+ADD_DEFINITIONS(-DNO_ROOT)
+
+#---Create a shared library with geneated dictionary
+add_library(OnlineData SHARED ${SRCS})
-- 
GitLab