diff --git a/PhysicsAnalysis/AnalysisCommon/AnalysisAssociation/CMakeLists.txt b/PhysicsAnalysis/AnalysisCommon/AnalysisAssociation/CMakeLists.txt
index a30520607d5e72ed27645f83622c8103781e1aab..ee3710a9bf2a6a433a34fecce3c54b7a8d345225 100644
--- a/PhysicsAnalysis/AnalysisCommon/AnalysisAssociation/CMakeLists.txt
+++ b/PhysicsAnalysis/AnalysisCommon/AnalysisAssociation/CMakeLists.txt
@@ -1,20 +1,10 @@
-################################################################################
-# Package: AnalysisAssociation
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( AnalysisAssociation )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaKernel
-                          Event/EventKernel
-                          Event/FourMomUtils
-                          GaudiKernel
-                          PhysicsAnalysis/AnalysisCommon/AnalysisUtils )
-
 # External dependencies:
-find_package( Boost COMPONENTS filesystem thread system )
+find_package( Boost )
 
 # Component(s) in the package:
 atlas_add_library( AnalysisAssociation
diff --git a/PhysicsAnalysis/AnalysisCommon/AnalysisTools/CMakeLists.txt b/PhysicsAnalysis/AnalysisCommon/AnalysisTools/CMakeLists.txt
index 90b130eba6639a7a0ec975d79e2c4c67947f013d..c11bf72e83322523e3c18fae7ba764a71f919b78 100644
--- a/PhysicsAnalysis/AnalysisCommon/AnalysisTools/CMakeLists.txt
+++ b/PhysicsAnalysis/AnalysisCommon/AnalysisTools/CMakeLists.txt
@@ -1,30 +1,10 @@
-################################################################################
-# Package: AnalysisTools
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( AnalysisTools )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          Control/AthContainers
-                          Control/StoreGate
-                          Event/NavFourMom
-                          GaudiKernel
-                          PhysicsAnalysis/AnalysisCommon/AnalysisUtils
-                          PhysicsAnalysis/TruthParticleID/McParticleEvent
-                          PRIVATE
-                          Control/SGTools
-                          Control/RootUtils
-                          Database/APR/RootCollection
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          Database/PersistentDataModel
-                          Event/xAOD/xAODEventInfo
-                          Event/EventInfo )
-
 # External dependencies:
-find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess )
+find_package( CORAL COMPONENTS CoralBase )
 find_package( Python COMPONENTS Development )
 find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
 
@@ -32,23 +12,21 @@ find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
 atlas_add_library( AthAnalysisToolsLib
                    src/*.cxx
                    PUBLIC_HEADERS AnalysisTools
-                   INCLUDE_DIRS ${Python_INCLUDE_DIRS}
-                   PRIVATE_INCLUDE_DIRS ${CORAL_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                   LINK_LIBRARIES ${Python_LIBRARIES} AthenaBaseComps AthContainers NavFourMom GaudiKernel McParticleEvent StoreGateLib SGtests AnalysisUtilsLib RootCollection
-                   PRIVATE_LINK_LIBRARIES ${CORAL_LIBRARIES} ${ROOT_LIBRARIES} SGTools RootCollection AthenaPoolUtilities PersistentDataModel xAODEventInfo EventInfo )
+                   INCLUDE_DIRS ${Python_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
+                   PRIVATE_INCLUDE_DIRS ${CORAL_INCLUDE_DIRS}
+                   LINK_LIBRARIES ${Python_LIBRARIES} ${ROOT_LIBRARIES} AnalysisUtilsLib AthContainers AthenaBaseComps GaudiKernel McParticleEvent NavFourMom
+                   PRIVATE_LINK_LIBRARIES ${CORAL_LIBRARIES} AthenaPoolUtilities EventInfo PersistentDataModel RootCollection RootUtils SGTools StoreGateLib xAODEventInfo )
 
 atlas_add_component( AthAnalysisTools
                      src/components/*.cxx
-                     INCLUDE_DIRS ${CORAL_INCLUDE_DIRS} ${Python_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${CORAL_LIBRARIES} ${Python_LIBRARIES} ${ROOT_LIBRARIES} AthenaBaseComps AthContainers StoreGateLib SGtests NavFourMom GaudiKernel AnalysisUtilsLib McParticleEvent SGTools RootCollection AthenaPoolUtilities PersistentDataModel xAODEventInfo EventInfo AthAnalysisToolsLib )
+                     LINK_LIBRARIES AthAnalysisToolsLib )
 
 atlas_add_dictionary( AthAnalysisToolsDict
                       AnalysisTools/AnalysisToolsDict.h
                       AnalysisTools/selection.xml
-                      INCLUDE_DIRS ${CORAL_INCLUDE_DIRS} ${Python_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${CORAL_LIBRARIES} ${Python_LIBRARIES} ${ROOT_LIBRARIES} AthenaBaseComps AthContainers StoreGateLib SGtests NavFourMom GaudiKernel AnalysisUtilsLib McParticleEvent SGTools RootCollection RootCollectionComponents AthenaPoolUtilities PersistentDataModel xAODEventInfo EventInfo AthAnalysisToolsLib )
+                      LINK_LIBRARIES AthAnalysisToolsLib )
 
 # Install files from the package:
-atlas_install_python_modules( python/*.py )
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
 atlas_install_joboptions( share/*.py )
 
diff --git a/PhysicsAnalysis/AnalysisCommon/AnalysisTools/python/AnalysisToolsConf.py b/PhysicsAnalysis/AnalysisCommon/AnalysisTools/python/AnalysisToolsConf.py
index 77400141f85d2345ad516711340636d5f1c6a7dd..734c1cf904a73a73a4eb2bad2e6990e8e722847c 100644
--- a/PhysicsAnalysis/AnalysisCommon/AnalysisTools/python/AnalysisToolsConf.py
+++ b/PhysicsAnalysis/AnalysisCommon/AnalysisTools/python/AnalysisToolsConf.py
@@ -1,6 +1,6 @@
 # Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
-from .AthAnalysisToolsConf import *
+from .AthAnalysisToolsConf import *  # noqa: F401 F403
 
 from AthenaCommon.Logging import log as _msg
 _msg.warning ('    AnalysisTools.AnalysisToolsConf is DEPRECATED !')
diff --git a/PhysicsAnalysis/AnalysisCommon/AnalysisUtils/CMakeLists.txt b/PhysicsAnalysis/AnalysisCommon/AnalysisUtils/CMakeLists.txt
index 096342566d96740c359c51a543195a90b797f5ef..58fcb1170f45ec2b9815f2f17c9844237bc83f89 100644
--- a/PhysicsAnalysis/AnalysisCommon/AnalysisUtils/CMakeLists.txt
+++ b/PhysicsAnalysis/AnalysisCommon/AnalysisUtils/CMakeLists.txt
@@ -1,67 +1,43 @@
-################################################################################
-# Package: AnalysisUtils
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( AnalysisUtils )
 
 if (NOT XAOD_STANDALONE)
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          Control/CxxUtils
-                          Control/AthContainers
-                          Control/StoreGate
-                          Event/EventKernel
-                          Event/NavFourMom
-                          GaudiKernel
-                          PhysicsAnalysis/AnalysisCommon/ParticleEvent
-                          PhysicsAnalysis/AraTool
-                          PhysicsAnalysis/TruthParticleID/McParticleEvent
-                          PRIVATE
-                          Reconstruction/Particle
-                          Reconstruction/egamma/egammaEvent )
-
 # External dependencies:
-find_package( Boost COMPONENTS filesystem thread system )
+find_package( Boost )
 find_package( CLHEP )
 find_package( HepPDT )
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
+find_package( ROOT COMPONENTS Core Tree )
 
 # Component(s) in the package:
 atlas_add_library( AnalysisUtilsLib
                    src/*.cxx
                    PUBLIC_HEADERS AnalysisUtils
-                   INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${HEPPDT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                   PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
+                   INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${HEPPDT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
                    DEFINITIONS ${CLHEP_DEFINITIONS}
-                   LINK_LIBRARIES ${Boost_LIBRARIES} ${HEPPDT_LIBRARIES} ${CLHEP_LIBRARIES} AthenaBaseComps AthenaKernel CxxUtils AthContainers EventKernel NavFourMom GaudiKernel ParticleEvent AraTool McParticleEvent StoreGateLib SGtests
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} Particle egammaEvent )
+                   LINK_LIBRARIES ${Boost_LIBRARIES} ${HEPPDT_LIBRARIES} ${CLHEP_LIBRARIES} ${ROOT_LIBRARIES} AthenaBaseComps AthenaKernel CxxUtils AthContainers EventKernel NavFourMom GaudiKernel ParticleEvent AraTool McParticleEvent
+                   PRIVATE_LINK_LIBRARIES Particle egammaEvent )
 
 atlas_add_component( AnalysisUtils
                      src/components/*.cxx
-                     INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${HEPPDT_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${Boost_LIBRARIES} ${HEPPDT_LIBRARIES} ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthenaBaseComps AthenaKernel CxxUtils AthContainers StoreGateLib SGtests EventKernel NavFourMom GaudiKernel ParticleEvent AraTool McParticleEvent Particle egammaEvent AnalysisUtilsLib )
+                     LINK_LIBRARIES AnalysisUtilsLib )
 
 atlas_add_dictionary( AnalysisUtilsDict
                       AnalysisUtils/AnalysisUtilsDict.h
                       AnalysisUtils/selection.xml
-                      INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${HEPPDT_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${Boost_LIBRARIES} ${HEPPDT_LIBRARIES} ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AthenaBaseComps AthenaKernel CxxUtils AthContainers StoreGateLib SGtests EventKernel NavFourMom GaudiKernel ParticleEvent AraTool McParticleEvent Particle egammaEvent AnalysisUtilsLib )
+                      LINK_LIBRARIES AnalysisUtilsLib )
 
 else()
 
-find_package( Boost COMPONENTS )
+find_package( Boost )
 
 # Component(s) in the package:
-atlas_add_library( AnalysisUtilsLib INTERFACE_ONLY
+atlas_add_library( AnalysisUtilsLib
+                   INTERFACE
                    PUBLIC_HEADERS AnalysisUtils
                    INCLUDE_DIRS ${Boost_INCLUDE_DIRS}
-                   PRIVATE_INCLUDE_DIRS
-                   DEFINITIONS
-                   LINK_LIBRARIES ${Boost_LIBRARIES} CxxUtils AthContainers
-                   PRIVATE_LINK_LIBRARIES )
+                   LINK_LIBRARIES ${Boost_LIBRARIES} CxxUtils AthContainers )
 
 endif()
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/CMakeLists.txt b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/CMakeLists.txt
index 87d7ca34c8b2074f0aaf99d60210fc2193f8a34e..6120c29fad3c4d644bba3f19ae8f23edb7691028 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/CMakeLists.txt
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/CMakeLists.txt
@@ -1,36 +1,8 @@
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+
 # The name of the package:
 atlas_subdir( AssociationUtils )
 
-# Extra dependencies based on the build environment:
-set( extra_dep )
-if( XAOD_STANDALONE )
-   set( extra_dep Control/xAODRootAccess )
-else()
-   set( extra_dep Control/AthenaBaseComps
-      GaudiKernel )
-endif()
-
-# The package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   Control/AthContainers
-   Control/AthLinks
-   Control/AthToolSupport/AsgTools
-   Event/xAOD/xAODBase
-   Event/xAOD/xAODEgamma
-   Event/xAOD/xAODJet
-   Event/xAOD/xAODBTagging
-   Event/xAOD/xAODMuon
-   Event/xAOD/xAODTau
-   Event/xAOD/xAODTracking
-   PhysicsAnalysis/D3PDTools/AnaAlgorithm
-   PRIVATE
-   Control/AthToolSupport/AsgTesting
-   Control/CxxUtils
-   Event/FourMomUtils
-   Event/xAOD/xAODEventInfo
-   ${extra_dep} )
-
 # External(s):
 find_package( ROOT COMPONENTS Core )
 find_package( Boost COMPONENTS program_options )
@@ -40,10 +12,10 @@ find_package( GTest )
 atlas_add_library( AssociationUtilsLib
    AssociationUtils/*.h Root/*.cxx
    PUBLIC_HEADERS AssociationUtils
-   INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-   LINK_LIBRARIES ${ROOT_LIBRARIES} AsgTools xAODBase xAODEgamma xAODJet xAODBTagging
-   xAODMuon xAODTau xAODTracking AthContainers AthLinks AnaAlgorithmLib
-   PRIVATE_LINK_LIBRARIES CxxUtils FourMomUtils )
+   PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
+   LINK_LIBRARIES AnaAlgorithmLib AsgMessagingLib AsgTools AthContainers AthLinks
+   xAODBase xAODEgamma xAODJet xAODMuon xAODTau xAODTracking
+   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} FourMomUtils )
 
 atlas_add_dictionary( AssociationUtilsDict
     AssociationUtils/AssociationUtilsDict.h
@@ -53,7 +25,7 @@ atlas_add_dictionary( AssociationUtilsDict
 if( NOT XAOD_STANDALONE )
    atlas_add_component( AssociationUtils
       src/*.h src/*.cxx src/components/*.cxx
-      LINK_LIBRARIES AthenaBaseComps xAODBase GaudiKernel AssociationUtilsLib )
+      LINK_LIBRARIES AthenaBaseComps xAODBase xAODBTagging GaudiKernel AssociationUtilsLib )
 endif()
 
 # Executables in the package:
@@ -61,7 +33,7 @@ if( XAOD_STANDALONE )
    atlas_add_executable( OverlapRemovalTester
       util/OverlapRemovalTester.cxx
       INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}
-      LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} xAODRootAccess
+      LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES}
       xAODEventInfo xAODEgamma xAODMuon xAODJet xAODBTagging xAODTau xAODEgamma
       AssociationUtilsLib )
 endif()
@@ -94,4 +66,4 @@ endif()
 
 # Install files from the package:
 atlas_install_joboptions( share/*.py )
-atlas_install_python_modules( python/*.py )
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
diff --git a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/python/config.py b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/python/config.py
index 926e8bb108090e76dc9e948cf5f390c726981481..d3fd4b94c56d6b50b0befe3ddb4ca667a673771c 100644
--- a/PhysicsAnalysis/AnalysisCommon/AssociationUtils/python/config.py
+++ b/PhysicsAnalysis/AnalysisCommon/AssociationUtils/python/config.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 """ AssociationUtils/config.py
     This file contains the configuration helper code for the overlap removal
@@ -8,9 +8,7 @@
     working in RootCore.
 """
 
-from AthenaCommon.Constants import INFO
-
-from AssociationUtils.AssociationUtilsConf import (
+from AssociationUtils.AssociationUtilsConf import (      # noqa: F401
     ORUtils__OverlapRemovalTool as OverlapRemovalTool,
     ORUtils__DeltaROverlapTool as DeltaROverlapTool,
     ORUtils__MuPFJetOverlapTool as MuPFJetOverlapTool,
diff --git a/PhysicsAnalysis/AnalysisCommon/CutBookkeeperUtils/CMakeLists.txt b/PhysicsAnalysis/AnalysisCommon/CutBookkeeperUtils/CMakeLists.txt
index 524c08942fc876ce842b07efb2c6a56ce3da4fe8..fc8b7676a1c6bac9bd4db6926479f1e7243af98f 100644
--- a/PhysicsAnalysis/AnalysisCommon/CutBookkeeperUtils/CMakeLists.txt
+++ b/PhysicsAnalysis/AnalysisCommon/CutBookkeeperUtils/CMakeLists.txt
@@ -1,19 +1,14 @@
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+
 # Set the project's name and version.
 atlas_subdir( CutBookkeeperUtils )
 
-atlas_depends_on_subdirs(
-  PUBLIC
-  Control/xAODRootAccess
-  Event/xAOD/xAODCore
-  Event/xAOD/xAODCutFlow
-  Control/AthToolSupport/AsgTools
-  Control/AthToolSupport/AsgMessaging
-  )
+# External dependencies:
+find_package( ROOT COMPONENTS Core RIO )
 
 # Add the library
 atlas_add_library(CutBookkeeperUtils
   Root/OriginalAodCounts.cxx
-  PUBLIC_HEADERS
-  CutBookkeeperUtils
-  LINK_LIBRARIES
-  xAODCore AsgTools xAODCutFlow xAODRootAccess AsgMessagingLib)
+  PUBLIC_HEADERS CutBookkeeperUtils
+  PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
+  PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} xAODCutFlow xAODRootAccess )
diff --git a/PhysicsAnalysis/AnalysisCommon/FsrUtils/CMakeLists.txt b/PhysicsAnalysis/AnalysisCommon/FsrUtils/CMakeLists.txt
index b15330433adfabf24f38117ecfafc5fc12f759e1..bc559bc74ad86289535abb8e7524b9d1f5c05629 100644
--- a/PhysicsAnalysis/AnalysisCommon/FsrUtils/CMakeLists.txt
+++ b/PhysicsAnalysis/AnalysisCommon/FsrUtils/CMakeLists.txt
@@ -1,32 +1,8 @@
-# $Id: CMakeLists.txt 782721 2016-11-07 12:38:42Z krasznaa $
-################################################################################
-# Package: FsrUtils
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( FsrUtils )
 
-# Extra dependencies based on the environment:
-set( extra_dep )
-if( XAOD_STANDALONE )
-   set( extra_dep Control/xAODRootAccess )
-else()
-   set( extra_dep GaudiKernel )
-endif()
-
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   Control/AthToolSupport/AsgTools
-   Event/xAOD/xAODEgamma
-   Event/xAOD/xAODMuon
-   PhysicsAnalysis/AnalysisCommon/IsolationSelection
-   PhysicsAnalysis/AnalysisCommon/PATInterfaces
-   PRIVATE
-   Control/AthenaBaseComps
-   Event/xAOD/xAODCore
-   ${extra_dep} )
-
 # External dependencies:
 find_package( ROOT COMPONENTS Core Physics RIO )
 
@@ -34,8 +10,8 @@ find_package( ROOT COMPONENTS Core Physics RIO )
 atlas_add_library( FsrUtilsLib
    FsrUtils/*.h Root/*.cxx
    PUBLIC_HEADERS FsrUtils
-   LINK_LIBRARIES AsgTools xAODMuon xAODEgamma PATInterfaces
-   IsolationSelectionLib )
+   LINK_LIBRARIES AsgTools xAODMuon xAODEgamma PATInterfaces IsolationSelectionLib
+   PRIVATE_LINK_LIBRARIES AsgMessagingLib )
 
 if( NOT XAOD_STANDALONE )
    atlas_add_component( FsrUtils
@@ -50,8 +26,7 @@ if( XAOD_STANDALONE )
    atlas_add_executable( FsrPhotonToolTester
       util/FsrPhotonToolTester.cxx
       INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-      LINK_LIBRARIES ${ROOT_LIBRARIES} xAODRootAccess xAODMuon xAODCore
-      FsrUtilsLib )
+      LINK_LIBRARIES ${ROOT_LIBRARIES} xAODMuon xAODCore FsrUtilsLib )
 endif()
 
 # Install files from the package:
diff --git a/PhysicsAnalysis/AnalysisCommon/IsolationSelection/CMakeLists.txt b/PhysicsAnalysis/AnalysisCommon/IsolationSelection/CMakeLists.txt
index 78334d1505741e28673963be880e02bc7a589be0..d30758a2046d500d1c8caceb59b1d86c15d7eb29 100644
--- a/PhysicsAnalysis/AnalysisCommon/IsolationSelection/CMakeLists.txt
+++ b/PhysicsAnalysis/AnalysisCommon/IsolationSelection/CMakeLists.txt
@@ -1,59 +1,25 @@
-# $Id: CMakeLists.txt 777113 2016-10-07 13:40:26Z krasznaa $
-################################################################################
-# Package: IsolationSelection
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( IsolationSelection )
 
-# Extra dependencies based on the environment:
-set( extra_dep )
-if( XAOD_STANDALONE )
-   set( extra_dep Control/xAODRootAccess )
-else()
-   set( extra_dep GaudiKernel )
-endif()
-
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-  PUBLIC
-  Control/AthContainers
-  Control/AthToolSupport/AsgTools
-  Event/xAOD/xAODBase
-  Event/xAOD/xAODEgamma
-  Event/xAOD/xAODMuon
-  Event/xAOD/xAODPrimitives
-  PhysicsAnalysis/AnalysisCommon/PATCore
-  PhysicsAnalysis/AnalysisCommon/PATInterfaces
-  InnerDetector/InDetRecTools/InDetTrackSelectionTool
-  PRIVATE
-  Event/FourMomUtils
-  Control/AthenaBaseComps
-  Tools/PathResolver
-  ${extra_dep} )
-
 # External dependencies:
 find_package( ROOT COMPONENTS Core Hist Tree )
 
-set(extra_libs)
-if ( NOT XAOD_STANDALONE)
-  set(extra_libs TrkExUtils)
-endif()
-
 # Libraries in the package:
 atlas_add_library( IsolationSelectionLib
   IsolationSelection/*.h Root/*.cxx
   PUBLIC_HEADERS IsolationSelection
-  PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-  LINK_LIBRARIES AthContainers AsgTools xAODBase xAODEgamma xAODMuon ${extra_libs}
-  xAODPrimitives PATCoreLib PATInterfaces InDetTrackSelectionToolLib
-  PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} FourMomUtils PathResolver )
+  INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
+  LINK_LIBRARIES ${ROOT_LIBRARIES} AthContainers AsgTools xAODBase xAODEgamma xAODMuon
+  xAODPrimitives xAODTracking PATCoreLib PATInterfaces
+  PRIVATE_LINK_LIBRARIES InDetTrackSelectionToolLib FourMomUtils PathResolver )
 
 if( NOT XAOD_STANDALONE )
    atlas_add_component( IsolationSelection
       src/*.h src/*.cxx src/components/*.cxx
-      LINK_LIBRARIES AsgTools AthenaBaseComps xAODEgamma xAODMuon GaudiKernel
-      IsolationSelectionLib )
+      LINK_LIBRARIES AsgTools AthenaBaseComps xAODBase xAODCore xAODEgamma xAODMuon
+      GaudiKernel IsolationSelectionLib )
 endif()
 
 atlas_add_dictionary( IsolationSelectionDict
@@ -66,13 +32,13 @@ if( XAOD_STANDALONE )
    atlas_add_executable( testIsolationCloseByCorrectionTool
       util/testIsolationCloseByCorrectionTool.cxx
       INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-      LINK_LIBRARIES ${ROOT_LIBRARIES} xAODRootAccess xAODEventInfo xAODEgamma
-      xAODMuon xAODCore IsolationSelectionLib )
+      LINK_LIBRARIES ${ROOT_LIBRARIES} AsgTools xAODBase xAODRootAccess xAODEventInfo
+      xAODEgamma xAODMuon xAODCore IsolationSelectionLib )
 
    atlas_add_executable( testIsolationSelectionTool
       util/testIsolationSelectionTool.cxx
       INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-      LINK_LIBRARIES ${ROOT_LIBRARIES} xAODRootAccess xAODEgamma xAODMuon
+      LINK_LIBRARIES ${ROOT_LIBRARIES} xAODEgamma xAODMuon
       xAODPrimitives IsolationSelectionLib )
 endif()
 
diff --git a/PhysicsAnalysis/AnalysisCommon/PATCore/CMakeLists.txt b/PhysicsAnalysis/AnalysisCommon/PATCore/CMakeLists.txt
index 6ee44014a08750a43dfaeeb24e2428ffd55c7abf..75ab7fd2cb0bd1f8c012a639f3a52723a988a1ed 100644
--- a/PhysicsAnalysis/AnalysisCommon/PATCore/CMakeLists.txt
+++ b/PhysicsAnalysis/AnalysisCommon/PATCore/CMakeLists.txt
@@ -1,24 +1,13 @@
-# $Id: CMakeLists.txt 744640 2016-05-03 19:08:14Z krasznaa $
-################################################################################
-# Package: PATCore
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( PATCore )
 
 # Extra dependencies, based on what environment we are in:
 if( NOT XAOD_STANDALONE )
-   set( extra_deps GaudiKernel )
    set( extra_libs GaudiKernel )
 endif()
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   Control/AthContainers
-   Control/AthToolSupport/AsgTools
-   ${extra_deps} )
-
 # External dependencies:
 find_package( ROOT COMPONENTS Core )
 
@@ -26,14 +15,13 @@ find_package( ROOT COMPONENTS Core )
 atlas_add_library( PATCoreAcceptLib
    Root/accept/*.cxx
    PUBLIC_HEADERS PATCore
-   INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-   LINK_LIBRARIES ${ROOT_LIBRARIES} )
+   PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
+   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} )
 
 atlas_add_library( PATCoreLib
    Root/*.cxx
    PUBLIC_HEADERS PATCore
-   INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-   LINK_LIBRARIES ${ROOT_LIBRARIES} PATCoreAcceptLib AthContainers AsgTools ${extra_libs} )
+   LINK_LIBRARIES PATCoreAcceptLib AthContainers AsgTools ${extra_libs} )
 
 atlas_add_dictionary( PATCoreDict
    PATCore/PATCoreDict.h
diff --git a/PhysicsAnalysis/AnalysisCommon/PMGOverlapRemovalTools/GammaORTools/CMakeLists.txt b/PhysicsAnalysis/AnalysisCommon/PMGOverlapRemovalTools/GammaORTools/CMakeLists.txt
index 32f32efe0d155db2c1c0ba604a442f248d7d21ad..743e678cc78fa9ca02a17ca8ff78aabf9df22bb8 100644
--- a/PhysicsAnalysis/AnalysisCommon/PMGOverlapRemovalTools/GammaORTools/CMakeLists.txt
+++ b/PhysicsAnalysis/AnalysisCommon/PMGOverlapRemovalTools/GammaORTools/CMakeLists.txt
@@ -1,40 +1,22 @@
-################################################################################
-# Package: GammaORTools
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( GammaORTools )
 
-# Extra dependencies, based on the environment:
-if( XAOD_STANDALONE )
-    set( extra_deps Control/xAODRootAccess )
-else()
-   set( extra_deps Control/AthenaBaseComps GaudiKernel PhysicsAnalysis/POOLRootAccess)
-endif()
-
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   Control/AthToolSupport/AsgTools
-   Event/xAOD/xAODTruth
-   Event/xAOD/xAODEventInfo
-   PhysicsAnalysis/Interfaces/PMGAnalysisInterfaces
-   PRIVATE
-   ${extra_deps} 
-   )
-
+# External dependencies:
+find_package( Boost )
 
 # Libraries in the package:
 atlas_add_library( GammaORToolsLib
    GammaORTools/*.h Root/*.cxx
    PUBLIC_HEADERS GammaORTools
-   INCLUDE_DIRS 
-   LINK_LIBRARIES AsgTools xAODTruth xAODEventInfo MCTruthClassifierLib )
+   INCLUDE_DIRS ${Boost_INCLUDE_DIRS}
+   LINK_LIBRARIES ${Boost_LIBRARIES} AsgTools xAODTruth MCTruthClassifierLib )
 
 if( NOT XAOD_STANDALONE )
   atlas_add_component( GammaORTools
     src/components/*.cxx
-    LINK_LIBRARIES AthenaBaseComps GaudiKernel GammaORToolsLib)
+    LINK_LIBRARIES GammaORToolsLib)
 endif()
 
 atlas_add_dictionary( GammaORToolsDict
diff --git a/PhysicsAnalysis/AnalysisCommon/PMGOverlapRemovalTools/HFORTools/CMakeLists.txt b/PhysicsAnalysis/AnalysisCommon/PMGOverlapRemovalTools/HFORTools/CMakeLists.txt
index 1413156682340c71be382848ba6ae62d069374a0..de7f9257f1b27fb2c56ebdfdccfc685f4498a13b 100644
--- a/PhysicsAnalysis/AnalysisCommon/PMGOverlapRemovalTools/HFORTools/CMakeLists.txt
+++ b/PhysicsAnalysis/AnalysisCommon/PMGOverlapRemovalTools/HFORTools/CMakeLists.txt
@@ -3,19 +3,6 @@
 # Declare the package name:
 atlas_subdir( HFORTools )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   Control/AthToolSupport/AsgTools
-   Event/xAOD/xAODJet
-   Event/xAOD/xAODTruth
-   Event/xAOD/xAODEventInfo
-   PhysicsAnalysis/Interfaces/PMGAnalysisInterfaces
-   PRIVATE
-   Event/xAOD/xAODBase
-   Tools/PathResolver
-)
-
 # External dependencies:
 find_package( Boost )
 find_package( ROOT COMPONENTS Core RIO )
@@ -24,7 +11,7 @@ find_package( ROOT COMPONENTS Core RIO )
 atlas_add_library( HFORToolsLib
    HFORTools/*.h Root/*.cxx
    PUBLIC_HEADERS HFORTools
-   LINK_LIBRARIES AsgTools xAODTruth xAODJet
+   LINK_LIBRARIES AsgTools PMGAnalysisInterfacesLib xAODTruth xAODJet
    PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS}
    PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} PathResolver xAODBase xAODEventInfo
    xAODRootAccess )
@@ -32,7 +19,7 @@ atlas_add_library( HFORToolsLib
 if( NOT XAOD_STANDALONE )
    atlas_add_component( HFORTools
       src/*.h src/*.cxx src/components/*.cxx
-      LINK_LIBRARIES GaudiKernel AthenaBaseComps xAODEventInfo HFORToolsLib )
+      LINK_LIBRARIES GaudiKernel AthenaBaseComps xAODEventInfo PMGAnalysisInterfacesLib HFORToolsLib )
 endif()
 
 atlas_add_dictionary( HFORToolsDict
@@ -52,7 +39,7 @@ endif()
 # Test(s) in the package:
 atlas_add_test( ut_HFORTools_test
    SOURCES test/ut_HFORTools_test.cxx
-   LINK_LIBRARIES AsgTools xAODEventInfo HFORToolsLib ${test_lib} )
+   LINK_LIBRARIES AsgTools PMGAnalysisInterfacesLib xAODEventInfo HFORToolsLib ${test_lib} )
 
 # Install files from the package:
 atlas_install_data( data/*.cfg )
diff --git a/PhysicsAnalysis/AnalysisCommon/PMGTools/CMakeLists.txt b/PhysicsAnalysis/AnalysisCommon/PMGTools/CMakeLists.txt
index 20f47211bd2307520e4a9369ee710b8a86893901..9a81cd237969d1c6ce78bf6437002858ec1cbda6 100644
--- a/PhysicsAnalysis/AnalysisCommon/PMGTools/CMakeLists.txt
+++ b/PhysicsAnalysis/AnalysisCommon/PMGTools/CMakeLists.txt
@@ -1,20 +1,8 @@
-#################################################################################
-# Package: PMGTools
-#################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( PMGTools )
 
-# Extra dependencies based on the build environment:
-set( extra_private_deps )
-# ... for AnalysisBase
-if( XAOD_STANDALONE )
-   set( extra_private_deps Control/xAODRootAccess )
-# ... for AthAnalysisBase/Athena
-else()
-   set( extra_private_deps Control/AthAnalysisBaseComps PhysicsAnalysis/POOLRootAccess GaudiKernel Event/EventInfo)
-endif()
-
 # Extra libraries based on the build environment:
 set( xaod_access_lib )
 set( extra_private_libs )
@@ -24,27 +12,9 @@ if( XAOD_STANDALONE )
 # ... for AthAnalysisBase (Athena calls this POOLRootAccess)
 else()
    set( xaod_access_lib POOLRootAccessLib )
-   set( extra_private_libs EventInfo )
+   set( extra_private_libs AthAnalysisBaseCompsLib EventInfo )
 endif()
 
-
-# Declare the package's dependencies:
-atlas_depends_on_subdirs(
-   PUBLIC
-   Control/AthToolSupport/AsgTools
-   Event/xAOD/xAODTruth
-   PhysicsAnalysis/AnalysisCommon/PATCore
-   PhysicsAnalysis/AnalysisCommon/PATInterfaces
-   PhysicsAnalysis/Interfaces/PMGAnalysisInterfaces
-   PRIVATE
-   Event/FourMomUtils
-   Event/xAOD/xAODEventInfo
-   Event/xAOD/xAODJet
-   Event/xAOD/xAODMetaData
-   PhysicsAnalysis/D3PDTools/RootCoreUtils
-   Tools/PathResolver
-   ${extra_private_deps} )
-
 # External(s) used by the package:
 find_package( ROOT COMPONENTS Core Hist RIO )
 find_package( Boost )
@@ -54,13 +24,14 @@ atlas_add_library( PMGToolsLib
    PMGTools/*.h Root/*.cxx
    PUBLIC_HEADERS PMGTools
    INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-   LINK_LIBRARIES ${ROOT_LIBRARIES} AsgTools PATCoreLib PATInterfaces xAODTruth
-   PRIVATE_LINK_LIBRARIES FourMomUtils PathResolver RootCoreUtils xAODEventInfo xAODJet xAODMetaData ${extra_private_libs})
+   PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS}
+   LINK_LIBRARIES ${ROOT_LIBRARIES} AsgTools PATCoreLib PATInterfaces PMGAnalysisInterfacesLib xAODTruth
+   PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} CxxUtils FourMomUtils PathResolver RootCoreUtils xAODBase xAODEventInfo xAODJet xAODMetaData ${extra_private_libs})
 
 if( NOT XAOD_STANDALONE )
    atlas_add_component( PMGTools
       src/components/*.cxx
-      LINK_LIBRARIES GaudiKernel PMGToolsLib )
+      LINK_LIBRARIES PMGToolsLib )
 endif()
 
 atlas_add_dictionary( PMGToolsDict
@@ -75,8 +46,8 @@ if( NOT XAOD_STANDALONE )
    atlas_add_executable( MyPMGApp
       test/MyPMGApp.cxx
       INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-      LINK_LIBRARIES ${ROOT_LIBRARIES} AthAnalysisBaseCompsLib ${xaod_access_lib}
-      AsgTools xAODJet xAODTruth FourMomUtils PATInterfaces PMGToolsLib )
+      LINK_LIBRARIES ${ROOT_LIBRARIES} AsgMessagingLib AsgTools GaudiKernel PATInterfaces
+      PMGAnalysisInterfacesLib PMGToolsLib xAODJet xAODTruth ${xaod_access_lib} )
 endif()
 
 # Test(s) in the package:
@@ -91,10 +62,10 @@ if( XAOD_STANDALONE )
    atlas_add_test( ut_PMGSherpaVjetsSysTool_test
       SOURCES test/ut_PMGSherpaVjetsSysTool_test.cxx
       INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-      LINK_LIBRARIES ${ROOT_LIBRARIES} AsgTools PATInterfaces PMGToolsLib ${xaod_access_lib} )
+      LINK_LIBRARIES ${ROOT_LIBRARIES} AsgTools PATInterfaces PMGAnalysisInterfacesLib PMGToolsLib ${xaod_access_lib} )
 endif()
 # ... AthAnalysis/AnalysisBase
 atlas_add_test( ut_PMGTruthWeightTool_test
    SOURCES test/ut_PMGTruthWeightTool_test.cxx
    INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-   LINK_LIBRARIES ${ROOT_LIBRARIES} PMGToolsLib ${xaod_access_lib} )
+   LINK_LIBRARIES ${ROOT_LIBRARIES} AsgMessagingLib AsgTools PMGAnalysisInterfacesLib PMGToolsLib xAODTruth ${xaod_access_lib} )
diff --git a/PhysicsAnalysis/AnalysisCommon/ParticleEvent/CMakeLists.txt b/PhysicsAnalysis/AnalysisCommon/ParticleEvent/CMakeLists.txt
index 0d398909f7dffa7e4c1c056402425d94546c876b..a7231275bd8b050c52afec11efe884e572ef9269 100644
--- a/PhysicsAnalysis/AnalysisCommon/ParticleEvent/CMakeLists.txt
+++ b/PhysicsAnalysis/AnalysisCommon/ParticleEvent/CMakeLists.txt
@@ -1,41 +1,21 @@
-################################################################################
-# Package: ParticleEvent
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( ParticleEvent )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthContainers
-                          Control/AthLinks
-                          Control/Navigation
-                          Control/AthenaKernel
-                          Event/EventKernel
-                          Event/FourMom
-                          Event/NavFourMom
-                          Reconstruction/Particle
-                          Tracking/TrkEvent/VxVertex 
-			  Control/CxxUtils)
-
 # External dependencies:
-find_package( Boost COMPONENTS filesystem thread system )
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
+find_package( Boost )
 
 # Component(s) in the package:
 atlas_add_library( ParticleEvent
                    src/*.cxx
                    PUBLIC_HEADERS ParticleEvent
                    INCLUDE_DIRS ${Boost_INCLUDE_DIRS}
-                   PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-		   LINK_LIBRARIES ${Boost_LIBRARIES} AthContainers AthLinks Navigation AthenaKernel EventKernel FourMom NavFourMom Particle VxVertex CxxUtils
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} )
+		           LINK_LIBRARIES ${Boost_LIBRARIES} AthContainers AthLinks Navigation AthenaKernel EventKernel FourMom NavFourMom Particle VxVertex CxxUtils )
 
 atlas_add_dictionary( ParticleEventDict
                       ParticleEvent/ParticleEventDict.h
                       ParticleEvent/selection.xml
-                      INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} AthContainers AthLinks Navigation AthenaKernel EventKernel FourMom NavFourMom Particle VxVertex ParticleEvent
-                      NAVIGABLES  DataVector<ParticleBase> NeutrinoContainer CompositeParticleContainer
-                      DATA_LINKS  TrackParticleAssocs INav4MomToTrackParticleAssocs )
-
+                      LINK_LIBRARIES ParticleEvent
+                      NAVIGABLES DataVector<ParticleBase> NeutrinoContainer CompositeParticleContainer
+                      DATA_LINKS TrackParticleAssocs INav4MomToTrackParticleAssocs )
diff --git a/PhysicsAnalysis/AnalysisCommon/ParticleEventAthenaPool/CMakeLists.txt b/PhysicsAnalysis/AnalysisCommon/ParticleEventAthenaPool/CMakeLists.txt
index e9b0644d91dc7f4bb116a8975050ca48dae51a21..3c993d7700d593e72cbdb8a4bf8048cf2b5cff7d 100644
--- a/PhysicsAnalysis/AnalysisCommon/ParticleEventAthenaPool/CMakeLists.txt
+++ b/PhysicsAnalysis/AnalysisCommon/ParticleEventAthenaPool/CMakeLists.txt
@@ -1,30 +1,16 @@
-################################################################################
-# Package: ParticleEventAthenaPool
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( ParticleEventAthenaPool )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/StoreGate
-                          Database/AtlasSealCLHEP
-                          GaudiKernel
-                          PhysicsAnalysis/AnalysisCommon/ParticleEvent
-                          PhysicsAnalysis/AnalysisCommon/ParticleEventTPCnv
-                          PRIVATE
-                          Database/AthenaPOOL/AthenaPoolCnvSvc
-                          Database/AthenaPOOL/AthenaPoolUtilities )
-
 atlas_add_library( ParticleEventAthenaPoolLib
                    ParticleEventAthenaPool/*.h
                    INTERFACE
                    PUBLIC_HEADERS ParticleEventAthenaPool
-                   LINK_LIBRARIES GaudiKernel AthenaPoolCnvSvcLib StoreGateLib ParticleEvent ParticleEventTPCnv )
+                   LINK_LIBRARIES AthenaPoolCnvSvcLib GaudiKernel ParticleEvent ParticleEventTPCnv StoreGateLib )
 
 # Component(s) in the package:
 atlas_add_poolcnv_library( ParticleEventAthenaPoolPoolCnv
                            src/*.cxx
                            FILES ParticleEvent/ParticleBaseContainer.h ParticleEvent/NeutrinoContainer.h ParticleEvent/CompositeParticleContainer.h ParticleEvent/ParticleShallowCloneContainer.h ParticleEvent/SelectedParticles.h ParticleEvent/TrackParticleAssocs.h ParticleEvent/INav4MomToTrackParticleAssocs.h
-                           LINK_LIBRARIES ParticleEventAthenaPoolLib SGtests AthenaPoolUtilities )
-
+                           LINK_LIBRARIES ParticleEventAthenaPoolLib )
diff --git a/PhysicsAnalysis/AnalysisCommon/ParticleEventTPCnv/CMakeLists.txt b/PhysicsAnalysis/AnalysisCommon/ParticleEventTPCnv/CMakeLists.txt
index 6553e0d22afe32e955c3e566b88b36e53fbb3c58..0019045bf8a3a4837ecef0ecfcc9933b38a3debf 100644
--- a/PhysicsAnalysis/AnalysisCommon/ParticleEventTPCnv/CMakeLists.txt
+++ b/PhysicsAnalysis/AnalysisCommon/ParticleEventTPCnv/CMakeLists.txt
@@ -1,123 +1,87 @@
-################################################################################
-# Package: ParticleEventTPCnv
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( ParticleEventTPCnv )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          AtlasTest/TestTools
-                          Control/AthLinks
-                          Control/DataModelAthenaPool
-                          Database/AthenaPOOL/AthenaPoolCnvSvc
-                          Event/EventCommonTPCnv
-                          GaudiKernel
-                          PhysicsAnalysis/AnalysisCommon/ParticleEvent
-                          Reconstruction/Particle
-                          PRIVATE
-                          Control/AthAllocators
-                          Control/AthenaKernel
-                          Control/SGTools
-                          Tracking/TrkEvent/VxVertex )
-
-# External dependencies:
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
-
 # Component(s) in the package:
 atlas_add_tpcnv_library( ParticleEventTPCnv
                          src/*.cxx
                          PUBLIC_HEADERS ParticleEventTPCnv
-                         INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                         LINK_LIBRARIES ${ROOT_LIBRARIES} TestTools AthLinks DataModelAthenaPoolLib AthenaPoolCnvSvcLib EventCommonTPCnv GaudiKernel ParticleEvent Particle AthAllocators AthenaKernel SGTools VxVertex )
+                         LINK_LIBRARIES AthLinks AthenaPoolCnvSvcLib DataModelAthenaPoolLib EventCommonTPCnv GaudiKernel Particle ParticleEvent
+                         PRIVATE_LINK_LIBRARIES AthAllocators AthenaKernel VxVertex )
 
 atlas_add_dictionary( ParticleEventTPCnvDict
                       ParticleEventTPCnv/ParticleEventTPCnvDict.h
                       ParticleEventTPCnv/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} TestTools AthLinks DataModelAthenaPoolLib AthenaPoolCnvSvcLib EventCommonTPCnv GaudiKernel ParticleEvent Particle AthAllocators AthenaKernel SGTools VxVertex ParticleEventTPCnv )
+                      LINK_LIBRARIES ParticleEventTPCnv )
 
+# Tests in the package:
 atlas_add_test( CompositeParticleCnv_p1_test
                 SOURCES
                 test/CompositeParticleCnv_p1_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} TestTools AthLinks DataModelAthenaPoolLib AthenaPoolCnvSvcLib EventCommonTPCnv GaudiKernel ParticleEvent Particle AthAllocators AthenaKernel SGTools VxVertex ParticleEventTPCnv )
+                LINK_LIBRARIES AthenaPoolCnvSvcLib GaudiKernel ParticleEvent ParticleEventTPCnv SGTools TestTools )
 
 atlas_add_test( CompositeParticleContainerCnv_p1_test
                 SOURCES
                 test/CompositeParticleContainerCnv_p1_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} TestTools AthLinks DataModelAthenaPoolLib AthenaPoolCnvSvcLib EventCommonTPCnv GaudiKernel ParticleEvent Particle AthAllocators AthenaKernel SGTools VxVertex ParticleEventTPCnv )
+                LINK_LIBRARIES AthAllocators GaudiKernel ParticleEvent ParticleEventTPCnv SGTools TestTools )
 
 atlas_add_test( INav4MomToTrackParticleAssocsCnv_p1_test
                 SOURCES
                 test/INav4MomToTrackParticleAssocsCnv_p1_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} TestTools AthLinks DataModelAthenaPoolLib AthenaPoolCnvSvcLib EventCommonTPCnv GaudiKernel ParticleEvent Particle AthAllocators AthenaKernel SGTools VxVertex ParticleEventTPCnv )
+                LINK_LIBRARIES GaudiKernel ParticleEvent ParticleEventTPCnv SGTools TestTools )
 
 atlas_add_test( NeutrinoCnv_p1_test
                 SOURCES
                 test/NeutrinoCnv_p1_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} TestTools AthLinks DataModelAthenaPoolLib AthenaPoolCnvSvcLib EventCommonTPCnv GaudiKernel ParticleEvent Particle AthAllocators AthenaKernel SGTools VxVertex ParticleEventTPCnv )
+                LINK_LIBRARIES AthenaPoolCnvSvcLib GaudiKernel ParticleEvent ParticleEventTPCnv SGTools TestTools )
 
 atlas_add_test( NeutrinoCnv_p2_test
                 SOURCES
                 test/NeutrinoCnv_p2_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} TestTools AthLinks DataModelAthenaPoolLib AthenaPoolCnvSvcLib EventCommonTPCnv GaudiKernel ParticleEvent Particle AthAllocators AthenaKernel SGTools VxVertex ParticleEventTPCnv )
+                LINK_LIBRARIES AthenaPoolCnvSvcLib GaudiKernel ParticleEvent ParticleEventTPCnv SGTools TestTools )
 
 atlas_add_test( NeutrinoContainerCnv_p1_test
                 SOURCES
                 test/NeutrinoContainerCnv_p1_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} TestTools AthLinks DataModelAthenaPoolLib AthenaPoolCnvSvcLib EventCommonTPCnv GaudiKernel ParticleEvent Particle AthAllocators AthenaKernel SGTools VxVertex ParticleEventTPCnv )
+                LINK_LIBRARIES GaudiKernel ParticleEvent ParticleEventTPCnv SGTools TestTools )
 
 atlas_add_test( NeutrinoContainerCnv_p2_test
                 SOURCES
                 test/NeutrinoContainerCnv_p2_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} TestTools AthLinks DataModelAthenaPoolLib AthenaPoolCnvSvcLib EventCommonTPCnv GaudiKernel ParticleEvent Particle AthAllocators AthenaKernel SGTools VxVertex ParticleEventTPCnv )
+                LINK_LIBRARIES GaudiKernel ParticleEvent ParticleEventTPCnv SGTools TestTools )
 
 atlas_add_test( ParticleBaseCnv_p1_test
                 SOURCES
                 test/ParticleBaseCnv_p1_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} TestTools AthLinks DataModelAthenaPoolLib AthenaPoolCnvSvcLib EventCommonTPCnv GaudiKernel ParticleEvent Particle AthAllocators AthenaKernel SGTools VxVertex ParticleEventTPCnv )
+                LINK_LIBRARIES GaudiKernel ParticleEvent ParticleEventTPCnv SGTools TestTools )
 
 atlas_add_test( ParticleBaseCnv_p2_test
                 SOURCES
                 test/ParticleBaseCnv_p2_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} TestTools AthLinks DataModelAthenaPoolLib AthenaPoolCnvSvcLib EventCommonTPCnv GaudiKernel ParticleEvent Particle AthAllocators AthenaKernel SGTools VxVertex ParticleEventTPCnv )
+                LINK_LIBRARIES GaudiKernel ParticleEvent ParticleEventTPCnv SGTools TestTools )
 
 atlas_add_test( ParticleBaseLinksCnv_p1_test
                 SOURCES
                 test/ParticleBaseLinksCnv_p1_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} TestTools AthLinks DataModelAthenaPoolLib AthenaPoolCnvSvcLib EventCommonTPCnv GaudiKernel ParticleEvent Particle AthAllocators AthenaKernel SGTools VxVertex ParticleEventTPCnv )
+                LINK_LIBRARIES GaudiKernel ParticleEvent ParticleEventTPCnv SGTools TestTools )
 
 atlas_add_test( ParticleShallowCloneCnv_p1_test
                 SOURCES
                 test/ParticleShallowCloneCnv_p1_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} TestTools AthLinks DataModelAthenaPoolLib AthenaPoolCnvSvcLib EventCommonTPCnv GaudiKernel ParticleEvent Particle AthAllocators AthenaKernel SGTools VxVertex ParticleEventTPCnv )
+                LINK_LIBRARIES GaudiKernel ParticleEvent ParticleEventTPCnv SGTools TestTools )
 
 atlas_add_test( ParticleShallowCloneContainerCnv_p1_test
                 SOURCES
                 test/ParticleShallowCloneContainerCnv_p1_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} TestTools AthLinks DataModelAthenaPoolLib AthenaPoolCnvSvcLib EventCommonTPCnv GaudiKernel ParticleEvent Particle AthAllocators AthenaKernel SGTools VxVertex ParticleEventTPCnv )
+                LINK_LIBRARIES AthenaPoolCnvSvcLib AthAllocators GaudiKernel ParticleEvent ParticleEventTPCnv SGTools TestTools )
 
 atlas_add_test( SelectedParticlesCnv_p1_test
                 SOURCES
                 test/SelectedParticlesCnv_p1_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} TestTools AthLinks DataModelAthenaPoolLib AthenaPoolCnvSvcLib EventCommonTPCnv GaudiKernel ParticleEvent Particle AthAllocators AthenaKernel SGTools VxVertex ParticleEventTPCnv )
+                LINK_LIBRARIES GaudiKernel ParticleEvent ParticleEventTPCnv TestTools )
 
 atlas_add_test( TrackParticleAssocsCnv_p1_test
                 SOURCES
                 test/TrackParticleAssocsCnv_p1_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} TestTools AthLinks DataModelAthenaPoolLib AthenaPoolCnvSvcLib EventCommonTPCnv GaudiKernel ParticleEvent Particle AthAllocators AthenaKernel SGTools VxVertex ParticleEventTPCnv )
-
+                LINK_LIBRARIES GaudiKernel ParticleEvent ParticleEventTPCnv SGTools TestTools )
diff --git a/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/CMakeLists.txt b/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/CMakeLists.txt
index c4817c3c307ed54fc28b7d2c159510597e7b6d64..c6037c209eb88a409839fb44ed9c6389efe4b50c 100644
--- a/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/CMakeLists.txt
+++ b/PhysicsAnalysis/AnalysisCommon/ParticleJetTools/CMakeLists.txt
@@ -1,46 +1,8 @@
-################################################################################
-# Package: ParticleJetTools
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( ParticleJetTools )
 
-
-# Declare the package's dependencies:
-if( XAOD_STANDALONE )
-   atlas_depends_on_subdirs(
-      PUBLIC
-      Control/AthToolSupport/AsgDataHandles
-      Control/AthToolSupport/AsgTools
-      Event/EventPrimitives
-      Event/xAOD/xAODJet
-      Event/xAOD/xAODTracking
-      Event/xAOD/xAODTruth
-      PhysicsAnalysis/MCTruthClassifier
-      Reconstruction/Jet/JetInterface
-      Reconstruction/Jet/JetRec
-      PRIVATE
-      Control/AthContainers
-      Generators/TruthUtils )
-else()
-   atlas_depends_on_subdirs(
-      PUBLIC
-      Control/AthToolSupport/AsgDataHandles
-      Control/AthToolSupport/AsgTools
-      Event/EventPrimitives
-      Event/xAOD/xAODJet
-      Event/xAOD/xAODTracking
-      Event/xAOD/xAODTruth
-      GaudiKernel
-      PhysicsAnalysis/MCTruthClassifier
-      Reconstruction/Jet/JetInterface
-      Reconstruction/Jet/JetRec
-      PRIVATE
-      Control/AthAnalysisBaseComps
-      Control/AthContainers
-      Generators/TruthUtils )
-endif()
-
 # Component(s) in the package:
 if( XAOD_STANDALONE )
    atlas_add_library( ParticleJetToolsLib
@@ -53,15 +15,16 @@ else()
    atlas_add_library( ParticleJetToolsLib
       ParticleJetTools/*.h Root/*.cxx src/*.cxx
       PUBLIC_HEADERS ParticleJetTools
-      LINK_LIBRARIES AsgTools EventPrimitives xAODJet xAODTracking xAODTruth GaudiKernel
-      JetInterface MCTruthClassifierLib JetRecLib AsgDataHandlesLib
-      PRIVATE_LINK_LIBRARIES AthAnalysisBaseCompsLib AthContainers TruthUtils )
+      LINK_LIBRARIES AsgDataHandlesLib AsgTools AthContainers AthenaBaseComps EventPrimitives
+      GaudiKernel JetInterface JetRecLib MCTruthClassifierLib
+      xAODBase xAODEventInfo xAODJet xAODTruth
+      PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} AsgMessagingLib AthAnalysisBaseCompsLib TruthUtils xAODTracking )
 endif()
 
 if( NOT XAOD_STANDALONE )
    atlas_add_component( ParticleJetTools
       src/components/*.cxx
-      LINK_LIBRARIES GaudiKernel ParticleJetToolsLib )
+      LINK_LIBRARIES ParticleJetToolsLib )
 endif()
 
 atlas_add_dictionary( ParticleJetToolsDict
@@ -70,4 +33,4 @@ atlas_add_dictionary( ParticleJetToolsDict
   LINK_LIBRARIES ParticleJetToolsLib )
 
 # Install files from the package:
-atlas_install_python_modules( python/*.py )
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
diff --git a/Reconstruction/RecoTools/CaloRingerTools/CMakeLists.txt b/Reconstruction/RecoTools/CaloRingerTools/CMakeLists.txt
index 017d06e259b651d258ada0d774b0c1dba0d6a395..9afd6db9ab7914875ead1bdef12bc427d15a1dfa 100644
--- a/Reconstruction/RecoTools/CaloRingerTools/CMakeLists.txt
+++ b/Reconstruction/RecoTools/CaloRingerTools/CMakeLists.txt
@@ -13,7 +13,7 @@ atlas_add_library( CaloRingerToolsLib
 atlas_add_component( CaloRingerTools
                      src/*.cxx
                      src/components/*.cxx
-                     LINK_LIBRARIES AthContainers AthLinks AthenaBaseComps AthenaKernel CaloEvent CaloGeoHelpers CaloRingerToolsLib CaloUtilsLib GaudiKernel PATCoreAcceptLib RingerSelectorToolsEnumsLib StoreGateLib xAODBase xAODCaloEvent xAODCaloRings xAODEgamma )
+                     LINK_LIBRARIES AthContainers AthLinks AthenaBaseComps AthenaKernel CaloEvent CaloGeoHelpers CaloRingerToolsLib CaloUtilsLib GaudiKernel PATCoreLib RingerSelectorToolsEnumsLib StoreGateLib xAODBase xAODCaloEvent xAODCaloRings xAODEgamma )
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )