From 4088650794e4123786c6a224a720fc8f937b056b Mon Sep 17 00:00:00 2001
From: Lars Bilke <lars.bilke@ufz.de>
Date: Wed, 17 Mar 2021 22:13:10 +0100
Subject: [PATCH] [cmake] Removed ChemistryLib dependency in ProcessLib.

---
 ProcessLib/CMakeLists.txt                            | 1 -
 ProcessLib/ComponentTransport/CMakeLists.txt         | 4 +++-
 ProcessLib/RichardsComponentTransport/CMakeLists.txt | 3 ++-
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/ProcessLib/CMakeLists.txt b/ProcessLib/CMakeLists.txt
index dd6f72d8d93..aec3f549ad9 100644
--- a/ProcessLib/CMakeLists.txt
+++ b/ProcessLib/CMakeLists.txt
@@ -31,7 +31,6 @@ target_link_libraries(
         MeshGeoToolsLib
         MeshLib
         NumLib
-        $<$<OR:$<BOOL:${OGS_BUILD_PROCESS_ComponentTransport}>,$<BOOL:${OGS_BUILD_PROCESS_RichardsComponentTransport}>>:ChemistryLib>
         $<$<TARGET_EXISTS:ProcessLibBoundaryConditionPython>:ProcessLibBoundaryConditionPython>
         $<$<TARGET_EXISTS:ProcessLibSourceTermPython>:ProcessLibSourceTermPython>
         nlohmann_json
diff --git a/ProcessLib/ComponentTransport/CMakeLists.txt b/ProcessLib/ComponentTransport/CMakeLists.txt
index 20f45f1a2f7..1d30ced30a1 100644
--- a/ProcessLib/ComponentTransport/CMakeLists.txt
+++ b/ProcessLib/ComponentTransport/CMakeLists.txt
@@ -2,7 +2,9 @@ get_source_files(SOURCES)
 
 ogs_add_library(ComponentTransport ${SOURCES})
 
-target_link_libraries(ComponentTransport PUBLIC ProcessLib PRIVATE ParameterLib)
+target_link_libraries(
+    ComponentTransport PUBLIC ProcessLib ChemistryLib PRIVATE ParameterLib
+)
 
 if(OGS_BUILD_TESTING)
     include(Tests.cmake)
diff --git a/ProcessLib/RichardsComponentTransport/CMakeLists.txt b/ProcessLib/RichardsComponentTransport/CMakeLists.txt
index 857f268bee0..e37b040ed61 100644
--- a/ProcessLib/RichardsComponentTransport/CMakeLists.txt
+++ b/ProcessLib/RichardsComponentTransport/CMakeLists.txt
@@ -2,7 +2,8 @@ get_source_files(SOURCES)
 
 ogs_add_library(RichardsComponentTransport ${SOURCES})
 target_link_libraries(
-    RichardsComponentTransport PUBLIC ProcessLib PRIVATE ParameterLib
+    RichardsComponentTransport PUBLIC ProcessLib ChemistryLib
+    PRIVATE ParameterLib
 )
 
 if(OGS_BUILD_TESTING)
-- 
GitLab