diff --git a/eos/CMakeLists.txt b/eos/CMakeLists.txt
index d6aa64e78ab3fddf90fb131994a9157f537575d1..3a9e4224214e08e889c57d4633aa9288a7a33437 100644
--- a/eos/CMakeLists.txt
+++ b/eos/CMakeLists.txt
@@ -16,8 +16,6 @@
 
 cmake_minimum_required (VERSION 2.6)
 
-add_subdirectory(messages)
-
 find_package (xrootdclient REQUIRED)
 include_directories (${XROOTD_INCLUDE_DIR} ${CMAKE_SOURCE_DIR})
 
diff --git a/xroot_plugins/CMakeLists.txt b/xroot_plugins/CMakeLists.txt
index 52df7119c9602022a5c70a5672c81f957649e546..2a4a189e6cbe4ea1c1ba9887c4226f91e68d8edd 100644
--- a/xroot_plugins/CMakeLists.txt
+++ b/xroot_plugins/CMakeLists.txt
@@ -35,6 +35,8 @@ set_target_properties(XrdCtaOfs PROPERTIES INSTALL_RPATH ${PROTOBUF3_RPATH})
 
 # XRootD SSI plugin for CTA Frontend
 
+add_subdirectory(messages)
+
 add_definitions(-DXRDSSI_DEBUG)
 include_directories(../xroot_ssi_pb)
 
diff --git a/eos/messages/CMakeLists.txt b/xroot_plugins/messages/CMakeLists.txt
similarity index 100%
rename from eos/messages/CMakeLists.txt
rename to xroot_plugins/messages/CMakeLists.txt
diff --git a/eos/messages/eos_messages.proto b/xroot_plugins/messages/eos_messages.proto
similarity index 100%
rename from eos/messages/eos_messages.proto
rename to xroot_plugins/messages/eos_messages.proto