From dc93558d4b7dc0f2165c20f9e727154244dfcc79 Mon Sep 17 00:00:00 2001
From: Dmitri Naumov <github@naumov.de>
Date: Thu, 28 Apr 2016 23:10:55 +0000
Subject: [PATCH] Add STATIC flag to circularly dependent libraries.

---
 AssemblerLib/CMakeLists.txt | 2 +-
 GeoLib/CMakeLists.txt       | 2 +-
 MathLib/CMakeLists.txt      | 4 ++--
 MeshLib/CMakeLists.txt      | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/AssemblerLib/CMakeLists.txt b/AssemblerLib/CMakeLists.txt
index 6595966e21b..62d7daf68b9 100644
--- a/AssemblerLib/CMakeLists.txt
+++ b/AssemblerLib/CMakeLists.txt
@@ -5,7 +5,7 @@ GET_SOURCE_FILES(SOURCES_ASSEMBLERLIB)
 set(SOURCES ${SOURCES_ASSEMBLERLIB})
 
 # Create the library
-add_library(AssemblerLib ${SOURCES})
+add_library(AssemblerLib STATIC ${SOURCES})
 
 target_link_libraries(AssemblerLib
 	MeshLib
diff --git a/GeoLib/CMakeLists.txt b/GeoLib/CMakeLists.txt
index 1938997b3a1..e8d65733920 100644
--- a/GeoLib/CMakeLists.txt
+++ b/GeoLib/CMakeLists.txt
@@ -2,7 +2,7 @@
 GET_SOURCE_FILES(SOURCES_GeoLib)
 
 # Create the library
-add_library(GeoLib ${SOURCES_GeoLib}
+add_library(GeoLib STATIC ${SOURCES_GeoLib}
 	${CMAKE_CURRENT_SOURCE_DIR}/../ThirdParty/tetgen/predicates.cxx
 )
 
diff --git a/MathLib/CMakeLists.txt b/MathLib/CMakeLists.txt
index 5d0095fdf38..a97ed510448 100644
--- a/MathLib/CMakeLists.txt
+++ b/MathLib/CMakeLists.txt
@@ -56,12 +56,12 @@ if(METIS_FOUND)
 endif()
 
 # Create the library
-add_library(MathLib ${SOURCES})
+add_library(MathLib STATIC ${SOURCES})
 
 set_target_properties(MathLib PROPERTIES LINKER_LANGUAGE CXX)
 
 target_link_libraries(MathLib
-    logog
+    AssemblerLib
 )
 
 if(METIS_FOUND)
diff --git a/MeshLib/CMakeLists.txt b/MeshLib/CMakeLists.txt
index b275ab4e15c..32e89742560 100644
--- a/MeshLib/CMakeLists.txt
+++ b/MeshLib/CMakeLists.txt
@@ -15,7 +15,7 @@ GET_SOURCE_FILES(SOURCES_QUALITY MeshQuality)
 set(SOURCES ${SOURCES_MESHLIB} ${SOURCES_ELEMENTS} ${SOURCES_EDITING} ${SOURCES_GENERATORS} ${SOURCES_QUALITY} ${SOURCES_SEARCH})
 
 # Create the library
-add_library(MeshLib ${SOURCES})
+add_library(MeshLib STATIC ${SOURCES})
 
 target_link_libraries(MeshLib
 	BaseLib
-- 
GitLab