diff --git a/examples/AlignDet/CMakeLists.txt b/examples/AlignDet/CMakeLists.txt
index 06a9d3106c358d28d879f849f448c5afd6cc2d54..6c7282fec5550a6beb8fa7be0505ee34e9085df6 100644
--- a/examples/AlignDet/CMakeLists.txt
+++ b/examples/AlignDet/CMakeLists.txt
@@ -14,10 +14,11 @@ include ( ${DD4hep_DIR}/cmake/DD4hep.cmake )
 #--------------------------------------------------------------------------
 dd4hep_configure_output()
 
-link_libraries(ROOT::Core ROOT::Geom ROOT::GenVector ROOT::MathCore
+link_libraries(
   DD4hep::DDCore
   DD4hep::DDCond
   DD4hep::DDAlign
+  ROOT::Core ROOT::Geom ROOT::GenVector ROOT::MathCore
   )
 set(AlignDet_INSTALL ${CMAKE_INSTALL_PREFIX}/examples/AlignDet)
 dd4hep_add_plugin(AlignDetExample SOURCES src/*.cpp)
diff --git a/examples/ClientTests/CMakeLists.txt b/examples/ClientTests/CMakeLists.txt
index 4c25334c3e944c23512c7f91468b85cf836eb75c..148d1ec26ae0bad6ef642c6fa1f592b7c351b4ca 100644
--- a/examples/ClientTests/CMakeLists.txt
+++ b/examples/ClientTests/CMakeLists.txt
@@ -14,15 +14,17 @@ include ( ${DD4hep_DIR}/cmake/DD4hep.cmake )
 #--------------------------------------------------------------------------
 dd4hep_configure_output()
 
-if(TARGET XercesC::XercesC)
-  link_libraries(XercesC::XercesC)
-endif()
-
-link_libraries(ROOT::Core ROOT::Geom ROOT::GenVector
+link_libraries(
   DD4hep::DDCore
   DD4hep::DDCond
   DD4hep::DDAlign
+  ROOT::Core ROOT::Geom ROOT::GenVector
   )
+
+if(TARGET XercesC::XercesC)
+  link_libraries(XercesC::XercesC)
+endif()
+
 include_directories(./include)
 #--------------------------------------------------------------------------
 if(TARGET Boost::boost)
diff --git a/examples/Conditions/CMakeLists.txt b/examples/Conditions/CMakeLists.txt
index 0ad6eec52e607543ab5615cc25c1368fa716341f..c84e4f533eba02e59edd0e1d6164cf873f978848 100644
--- a/examples/Conditions/CMakeLists.txt
+++ b/examples/Conditions/CMakeLists.txt
@@ -18,10 +18,11 @@ if(TARGET XercesC::XercesC)
   link_libraries(XercesC::XercesC)
 endif()
 
-link_libraries(ROOT::Core ROOT::Geom ROOT::GenVector
+link_libraries(
   DD4hep::DDCore
   DD4hep::DDCond
   DD4hep::DDAlign
+  ROOT::Core ROOT::Geom ROOT::GenVector
   )
   
 #-----------------------------------------------------------------------------------
diff --git a/examples/DDCMS/CMakeLists.txt b/examples/DDCMS/CMakeLists.txt
index 819df9acbd3c31b84d10399c3fd002e8e3b662f4..4532099392dffb12f765cade13ca06dad687df87 100644
--- a/examples/DDCMS/CMakeLists.txt
+++ b/examples/DDCMS/CMakeLists.txt
@@ -48,7 +48,7 @@ endif()
 #
 #---DDCMS plugin library -------------------------------------------------------
 dd4hep_add_plugin ( DDCMS SOURCES src/*.cpp src/plugins/*.cpp
-  USES DD4hep::DDCore DD4hep::DDAlign DD4hep::DDCond ROOT::Core ROOT::Geom ROOT::GenVector
+  USES DD4hep::DDParsers DD4hep::DDCore DD4hep::DDAlign DD4hep::DDCond ROOT::Core ROOT::Geom ROOT::GenVector
   )
 install(TARGETS DDCMS LIBRARY DESTINATION lib)
 target_include_directories(DDCMS PUBLIC include)
diff --git a/examples/DDDigi/CMakeLists.txt b/examples/DDDigi/CMakeLists.txt
index 5320c760971ef3c74082b634524991cac4815472..a313599cce99939495c35e4afbc23c99596b93dd 100644
--- a/examples/DDDigi/CMakeLists.txt
+++ b/examples/DDDigi/CMakeLists.txt
@@ -14,13 +14,12 @@ include ( ${DD4hep_DIR}/cmake/DD4hep.cmake )
 #-----------------------------------------------------------------------------------
 dd4hep_configure_output ()
 
-link_libraries(DD4hep::DDDigi)
 set(DDDigiexamples_INSTALL  ${CMAKE_INSTALL_PREFIX}/examples/DDDigi)
 #
 dd4hep_set_compiler_flags()
 #
 dd4hep_add_plugin(DDDigiExampleLib SOURCES src/*.cpp )
-target_link_libraries(DDDigiExampleLib Boost::boost ROOT::Geom ROOT::GenVector ROOT::RIO)
+target_link_libraries(DDDigiExampleLib DD4hep::DDDigi Boost::boost ROOT::Geom ROOT::GenVector ROOT::RIO)
 install(TARGETS DDDigiExampleLib LIBRARY DESTINATION lib)
 install(DIRECTORY scripts DESTINATION ${DDDigiexamples_INSTALL})
 #
diff --git a/examples/DDG4_MySensDet/CMakeLists.txt b/examples/DDG4_MySensDet/CMakeLists.txt
index ff15daa9d8bbf4737b5ea0e3ffaeedfd768c085f..8e29086f0a27899619cc12688fcc902cfeb52426 100644
--- a/examples/DDG4_MySensDet/CMakeLists.txt
+++ b/examples/DDG4_MySensDet/CMakeLists.txt
@@ -16,8 +16,8 @@ if(NOT TARGET Geant4::Interface)
   return()
 endif()
 
-link_libraries(Geant4::Interface ROOT::Core ROOT::Geom ROOT::GenVector ROOT::RIO
-  DD4hep::DDCore DD4hep::DDG4)
+link_libraries(DD4hep::DDCore DD4hep::DDG4 Geant4::Interface ROOT::Core ROOT::Geom ROOT::GenVector ROOT::RIO)
+
 
 #-----------------------------------------------------------------------------------
 set(DDG4_MySensDet_INSTALL ${CMAKE_INSTALL_PREFIX}/examples/DDG4_MySensDet)
@@ -39,7 +39,7 @@ if (DD4HEP_USE_GEANT4)
   dd4hep_add_plugin( DDG4_MySensDet
     GENERATED G__DDG4_MySensDet.cxx
     SOURCES   src/*.cpp
-    USES      Geant4::Interface ROOT::Core ROOT::Geom ROOT::GenVector ROOT::RIO DD4hep::DDCore DD4hep::DDG4
+    USES      DD4hep::DDCore DD4hep::DDG4 Geant4::Interface ROOT::Core ROOT::Geom ROOT::GenVector ROOT::RIO
     )
   install(TARGETS DDG4_MySensDet DESTINATION lib)
   
diff --git a/examples/LHeD/CMakeLists.txt b/examples/LHeD/CMakeLists.txt
index a0620ab50aa9c2bc9649bde943ed49717a1ba98f..c716a48acc5c3b1beaf684735ca089dbe73ce9bc 100644
--- a/examples/LHeD/CMakeLists.txt
+++ b/examples/LHeD/CMakeLists.txt
@@ -25,11 +25,10 @@ set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
 
 dd4hep_add_plugin(LHeD
   SOURCES src/*.cpp
-  USES  ROOT::Core ROOT::Geom ROOT::GenVector DD4hep::DDRec DD4hep::DDCore DD4hep::DDCond DD4hep::DDAlign
+  USES    DD4hep::DDRec DD4hep::DDCore DD4hep::DDCond DD4hep::DDAlign ROOT::Core ROOT::Geom ROOT::GenVector 
   )
 
 if (DD4HEP_USE_GEANT4)
-  find_package(Geant4 REQUIRED)
   add_executable(LHeDXML scripts/LHeDXML.C)
   target_link_libraries(LHeDXML DD4hep::DDCore DD4hep::DDG4 Geant4::Interface)
   #--------------------------------------------------------------------------
diff --git a/examples/LHeD/src/Lhe_BeamPipe_Central_geo.cpp b/examples/LHeD/src/Lhe_BeamPipe_Central_geo.cpp
index 977d22962096b7b90a094903d23295080fe0d987..8afc22bb4328e4caf1bb7ca9815564fe2abaf051 100644
--- a/examples/LHeD/src/Lhe_BeamPipe_Central_geo.cpp
+++ b/examples/LHeD/src/Lhe_BeamPipe_Central_geo.cpp
@@ -106,7 +106,7 @@ static Ref_t create_detector(Detector& description, xml_h e, SensitiveDetector s
   DetElement sdet (name,x_det.id());
   Material   mat  (description.material(x_det.materialStr()));
   //  vector<double> rmin,rmax,z,thickness;
-  double rmin, rmax, thickness, z;
+  double rmin, rmax, thickness, z=0.0;
   //  PlacedVolume pv;
 
   // multiplication factor for ellipse major radius
diff --git a/examples/Persistency/CMakeLists.txt b/examples/Persistency/CMakeLists.txt
index b148f353b02ece5439c8e6d7eae1d87c497e6ca9..68904d920de5e395e4bbe7da0fec35f6180755c9 100644
--- a/examples/Persistency/CMakeLists.txt
+++ b/examples/Persistency/CMakeLists.txt
@@ -11,10 +11,10 @@
 cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
 include ( ${DD4hep_DIR}/cmake/DD4hep.cmake )
 
+link_libraries(DD4hep::DDCore ROOT::Core ROOT::Geom ROOT::GenVector)
 if(TARGET XercesC::XercesC)
   link_libraries(XercesC::XercesC)
 endif()
-link_libraries(ROOT::Core ROOT::Geom ROOT::GenVector DD4hep::DDCore)
 
 #-----------------------------------------------------------------------------------
 dd4hep_add_plugin(PersistencyExample SOURCES src/*.cpp)
diff --git a/examples/SimpleDetector/CMakeLists.txt b/examples/SimpleDetector/CMakeLists.txt
index 2b54a46fdb92da220475596081920b85a0f3a05b..feecea3a8ef2bcf78c34022898a1016b76960f8a 100644
--- a/examples/SimpleDetector/CMakeLists.txt
+++ b/examples/SimpleDetector/CMakeLists.txt
@@ -12,12 +12,12 @@ cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
 include ( ${DD4hep_DIR}/cmake/DD4hep.cmake )
 
 #-----------------------------------------------------------------------------------
+link_libraries(DD4hep::DDCore DD4hep::DDRec ROOT::Core ROOT::Geom ROOT::GenVector)
+
 if(TARGET XercesC::XercesC)
   link_libraries(XercesC::XercesC)
 endif()
 
-link_libraries(ROOT::Core ROOT::Geom ROOT::GenVector DD4hep::DDCore DD4hep::DDRec)
-
 dd4hep_add_plugin(SimpleDetector SOURCES src/*.cpp)
 install(TARGETS SimpleDetector LIBRARY DESTINATION lib)
 install(DIRECTORY compact DESTINATION examples/ClientTests)