diff --git a/objectstore/CMakeLists.txt b/objectstore/CMakeLists.txt
index a3daf3c860d5f89ad820dc03c75c8a9e26583654..7d985d6a2b24785a9f414b1e1378b4b5e1d5732f 100644
--- a/objectstore/CMakeLists.txt
+++ b/objectstore/CMakeLists.txt
@@ -11,6 +11,25 @@ set (CTAProtoFiles
 
 PROTOBUF_GENERATE_CPP(CTAProtoSources CTAProtoHeaders ${CTAProtoFiles})
 
+set (CTAProtoDependants objectstore/Agent.hpp
+  objectstore/ArchiveToFileRequest.hpp
+  objectstore/CreationLog.hpp
+  objectstore/GenericObject.hpp
+  objectstore/ObjectOps.cpp
+  objectstore/ObjectOps.hpp
+  objectstore/RetrieveToFileRequest.cpp
+  objectstore/RetrieveToFileRequest.hpp
+  objectstore/RootEntry.hpp
+  objectstore/SchedulerGlobalLock.hpp
+  objectstore/Tape.hpp
+  objectstore/TapePool.hpp
+  objectstore/UserIdentity.hpp)
+
+SET_SOURCE_FILES_PROPERTIES(${CTAProtoHeaders} PROPERTIES HEADER_FILE_ONLY TRUE)
+SET_SOURCE_FILES_PROPERTIES(${CTAProtoDependants} 
+  PROPERTIES OBJECT_DEPENDS ${CTAProtoHeaders})
+
+
 add_library (CTAObjectStore
   ${CTAProtoSources}
   RootEntry.cpp
diff --git a/scheduler/Scheduler.hpp b/scheduler/Scheduler.hpp
index 343354f18dda1e73c1d54071f5b20942fe1fba1e..f9686d81530c977e945d38f0a8f42a9b036a6626 100644
--- a/scheduler/Scheduler.hpp
+++ b/scheduler/Scheduler.hpp
@@ -20,7 +20,6 @@
 
 #include "common/exception/Exception.hpp"
 #include "scheduler/SchedulerDatabase.hpp"
-#include "objectstore/DriveRegister.hpp"
 
 #include <list>
 #include <map>
diff --git a/scheduler/SchedulerDatabase.hpp b/scheduler/SchedulerDatabase.hpp
index a578bed12dee2fa13ed6828c5acce31143e9016b..151ae1c5f460c4b20589c9ba42c5d08fee8412cb 100644
--- a/scheduler/SchedulerDatabase.hpp
+++ b/scheduler/SchedulerDatabase.hpp
@@ -32,8 +32,8 @@
 #include "common/archiveRoutes/ArchiveRoute.hpp"
 #include "common/remoteFS/RemotePathAndStatus.hpp"
 #include "common/MountControl.hpp"
+#include "common/DriveState.hpp"
 #include "nameserver/NameServerTapeFile.hpp"
-#include "objectstore/DriveRegister.hpp"
 #include "scheduler/MountType.hpp"
 
 namespace cta {