diff --git a/Applications/CMakeLists.txt b/Applications/CMakeLists.txt
index 3f9779020ff1ea812a9fb40eac293aa1885a6831..4d6f251577b39541172525bfce62b72a2f68e8eb 100644
--- a/Applications/CMakeLists.txt
+++ b/Applications/CMakeLists.txt
@@ -1,7 +1,3 @@
-if(OGS_BUILD_GUI)
-	add_definitions(-DOGS_BUILD_GUI)
-endif()
-
 add_subdirectory(ApplicationsLib)
 
 if(OGS_BUILD_UTILS AND NOT IS_SUBPROJECT)
@@ -12,7 +8,6 @@ if(OGS_BUILD_GUI)
 	add_subdirectory(DataExplorer)
 endif() # OGS_BUILD_GUI
 
-
 if(OGS_BUILD_CLI)
     add_subdirectory(CLI)
 endif() # OGS_BUILD_CLI
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7fd4695a645dc2b20fa0c624c8b05509d174389d..98cb5e89e7e7b551b07ab129e214c883e5a8fb8c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -52,6 +52,9 @@ option(OGS_DONT_USE_QT "Disables all Qt specific code." OFF)
 option(OGS_BUILD_CLI "Should the OGS simulator be built?" ON)
 option(OGS_BUILD_TESTS "Should the test executables be built?" ON)
 option(OGS_BUILD_GUI "Should the Data Explorer be built?" OFF)
+if(OGS_BUILD_GUI)
+	add_definitions(-DOGS_BUILD_GUI)
+endif()
 option(OGS_BUILD_UTILS "Should the utilities programms be built?" OFF)
 
 option(OGS_NO_EXTERNAL_LIBS "Builds OGS without any external dependencies." OFF)
diff --git a/Tests/ApplicationsLib/TestProjectData.cpp b/Tests/ApplicationsLib/TestProjectData.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..fc1bb7458edb3e7a2951e79517f325ce28d64c9a
--- /dev/null
+++ b/Tests/ApplicationsLib/TestProjectData.cpp
@@ -0,0 +1,27 @@
+/**
+ * \file   TestProjectData.cpp
+ * \date   2015-07-13
+ *
+ * \copyright
+ * Copyright (c) 2012-2015, OpenGeoSys Community (http://www.opengeosys.org)
+ *            Distributed under a Modified BSD License.
+ *              See accompanying file LICENSE.txt or
+ *              http://www.opengeosys.org/project/license
+ *
+ *
+ */
+
+#include "gtest/gtest.h"
+#include "Applications/ApplicationsLib/ProjectData.h"
+
+TEST(ApplicationsLib, ProjectData)
+{
+	ProjectData project;
+#ifdef OGS_BUILD_GUI
+	GEOModels* geo_objects = dynamic_cast<GEOModels*>(project.getGEOObjects());
+#else
+	GeoLib::GEOObjects *geo_objects = project.getGEOObjects();
+#endif
+
+	ASSERT_TRUE(geo_objects);
+}
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 698541736faefc3e126ebf2d1deb75b7dee8569d..4e62a27879f98049e69f9c2739d98d43e4775125 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -5,6 +5,7 @@ if(MSVC)
 endif()
 
 APPEND_SOURCE_FILES(TEST_SOURCES)
+APPEND_SOURCE_FILES(TEST_SOURCES ApplicationsLib)
 APPEND_SOURCE_FILES(TEST_SOURCES AssemblerLib)
 APPEND_SOURCE_FILES(TEST_SOURCES BaseLib)
 APPEND_SOURCE_FILES(TEST_SOURCES GeoLib)