diff --git a/Applications/CLI/CMakeLists.txt b/Applications/CLI/CMakeLists.txt
index c40c106e77a7cdb08cfb64975087195dae418e14..203f3d522b3a2c8ed6659b52831e4d1452eb421d 100644
--- a/Applications/CLI/CMakeLists.txt
+++ b/Applications/CLI/CMakeLists.txt
@@ -15,6 +15,10 @@ target_link_libraries(ogs
 
 )
 
+if(OGS_BUILD_GUI)
+	target_link_libraries(ogs QtDataView VtkVis vtkInteractionStyle)
+endif()
+
 ADD_CATALYST_DEPENDENCY(ogs)
 
 if(OGS_USE_PETSC)
diff --git a/Applications/CMakeLists.txt b/Applications/CMakeLists.txt
index 5cf58e97cb4dc2fcc9ce0a2981e1a83b645ea4f9..3f9779020ff1ea812a9fb40eac293aa1885a6831 100644
--- a/Applications/CMakeLists.txt
+++ b/Applications/CMakeLists.txt
@@ -1,3 +1,7 @@
+if(OGS_BUILD_GUI)
+	add_definitions(-DOGS_BUILD_GUI)
+endif()
+
 add_subdirectory(ApplicationsLib)
 
 if(OGS_BUILD_UTILS AND NOT IS_SUBPROJECT)
@@ -5,7 +9,6 @@ if(OGS_BUILD_UTILS AND NOT IS_SUBPROJECT)
 endif() # OGS_BUILD_UTILS AND NOT IS_SUBPROJECT
 
 if(OGS_BUILD_GUI)
-	add_definitions(-DOGS_BUILD_GUI)
 	add_subdirectory(DataExplorer)
 endif() # OGS_BUILD_GUI
 
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 63bd0d05878f18d76fb832a3b0943b898fd3bf59..698541736faefc3e126ebf2d1deb75b7dee8569d 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -75,6 +75,7 @@ if(OGS_BUILD_GUI)
 	target_link_libraries(testrunner
 		QtDataView
 		VtkVis
+		vtkInteractionStyle
 	)
 endif()
 
diff --git a/Tests/FileIO/TestXmlGmlReader.cpp b/Tests/FileIO/TestXmlGmlReader.cpp
index 398913ad2ad99bfeae930a59124420c1d59da1ab..23428e4b043325198b6cabeab9ef7bfd77b6c870 100644
--- a/Tests/FileIO/TestXmlGmlReader.cpp
+++ b/Tests/FileIO/TestXmlGmlReader.cpp
@@ -31,7 +31,6 @@ TEST(FileIO, XmlGmlWriterReaderTest)
 	// Writer test
 	std::string test_data_file(BaseLib::BuildInfo::source_path + "/Tests/FileIO/xmlgmltestdata.gml");
 
-	ProjectData project;
 	GeoLib::GEOObjects geo_objects;
 
 	//setup test data