diff --git a/MAC/Services/CMakeLists.txt b/MAC/Services/CMakeLists.txt
index 5a28a358a0b37cc84a27a1bdaa1a8b4c12eeda3d..871ed340d96557c981a94f902aeed4019becb896 100644
--- a/MAC/Services/CMakeLists.txt
+++ b/MAC/Services/CMakeLists.txt
@@ -1,7 +1,13 @@
 # $Id$
 
-lofar_package(MAC_Services 1.0 DEPENDS PyMessaging OTDB_Services pyparameterset Docker ResourceAssignmentService TBBService TMSSClient)
+if(BUILD_TESTING)
+    lofar_package(MAC_Services 1.0 DEPENDS PyMessaging OTDB_Services pyparameterset Docker ResourceAssignmentService TBBService TMSSBackend)
+ELSE()
+    lofar_package(MAC_Services 1.0 DEPENDS PyMessaging OTDB_Services pyparameterset Docker ResourceAssignmentService TBBService TMSSClient)
+ENDIF(BUILD_TESTING)
 
 add_subdirectory(src)
 add_subdirectory(test)
 lofar_add_package(TBBService TBB)
+
+
diff --git a/SAS/TMSS/backend/CMakeLists.txt b/SAS/TMSS/backend/CMakeLists.txt
index 23c473ab1fdf57c1c895a56c7aeafcc247a3eb00..d3c282069415d69565b2543e9bf025a6bdca68f0 100644
--- a/SAS/TMSS/backend/CMakeLists.txt
+++ b/SAS/TMSS/backend/CMakeLists.txt
@@ -1,4 +1,4 @@
-lofar_package(TMSSBackend 0.1 DEPENDS TMSSClient PyCommon pyparameterset PyMessaging MAC_Services sip PyStationModel)
+lofar_package(TMSSBackend 0.1 DEPENDS TMSSClient PyCommon pyparameterset PyMessaging sip PyStationModel)
 
 lofar_add_package(TMSSBackendLibs src)
 add_subdirectory(test)
diff --git a/SAS/TMSS/backend/services/tmss_ra_adapter/CMakeLists.txt b/SAS/TMSS/backend/services/tmss_ra_adapter/CMakeLists.txt
index 790488c1d505bf94e4b4540a1fcc01cd6de7503a..e438befc54e6c01084b17f01c5c6f976a1dfff4f 100644
--- a/SAS/TMSS/backend/services/tmss_ra_adapter/CMakeLists.txt
+++ b/SAS/TMSS/backend/services/tmss_ra_adapter/CMakeLists.txt
@@ -1,4 +1,4 @@
-lofar_package(TMSSRAAdapter 0.1 DEPENDS TMSSClient ResourceAssigner)
+lofar_package(TMSSRAAdapter 0.1 DEPENDS TMSSClient RATaskSpecifiedService)
 
 add_subdirectory(lib)
 add_subdirectory(bin)
diff --git a/SAS/TMSS/backend/src/CMakeLists.txt b/SAS/TMSS/backend/src/CMakeLists.txt
index 5244300fe486a0b618d833736d79dbcfa5cb259c..10fe3f7a4f98c28c52300aeeec7fd06b7278673a 100644
--- a/SAS/TMSS/backend/src/CMakeLists.txt
+++ b/SAS/TMSS/backend/src/CMakeLists.txt
@@ -1,4 +1,4 @@
-lofar_package(TMSSBackendLibs 0.1 DEPENDS TMSSClient PyCommon pyparameterset PyMessaging MAC_Services sip PyStationModel)
+lofar_package(TMSSBackendLibs 0.1 DEPENDS TMSSClient PyCommon pyparameterset PyMessaging sip PyStationModel)
 
 set(USE_PYTHON_COMPILATION Off)
 lofar_find_package(PythonInterp 3.5 REQUIRED)