diff --git a/GaudiExamples/CMakeLists.txt b/GaudiExamples/CMakeLists.txt
index 3bc01f503f28f5a0d2db6b7bfd46558c74aca5a4..9635ebd5e831c6dcfea5c2e662ef1ae6cb79292a 100644
--- a/GaudiExamples/CMakeLists.txt
+++ b/GaudiExamples/CMakeLists.txt
@@ -132,19 +132,19 @@ if(GAUDI_USE_AIDA)
                                          src/IO/WriteHandleAlg.cpp
                                          src/RandomNumber/RandomNumberAlg.cpp)
     target_link_libraries(GaudiExamples PRIVATE AIDA::aida)
+    if(GAUDI_USE_CLHEP)
+        target_sources(GaudiExamples PRIVATE src/TupleEx/TupleAlg2.cpp
+                                             src/TupleEx/TupleAlg3.cpp
+                                             src/TupleEx/TupleAlg.cpp
+                                             src/TupleEx/TupleDef.cpp)
+        target_link_libraries(GaudiExamples PRIVATE CLHEP::CLHEP)
+    endif()
 endif()
 if(GAUDI_USE_HEPPDT)
     target_sources(GaudiExamples PRIVATE src/PartProp/GaudiPPS.cpp
                                          src/PartProp/PartPropExa.cpp)
     target_link_libraries(GaudiExamples PRIVATE HepPDT::heppdt)
 endif()
-if(GAUDI_USE_CLHEP)
-    target_sources(GaudiExamples PRIVATE src/TupleEx/TupleAlg2.cpp
-                                         src/TupleEx/TupleAlg3.cpp
-                                         src/TupleEx/TupleAlg.cpp
-                                         src/TupleEx/TupleDef.cpp)
-    target_link_libraries(GaudiExamples PRIVATE CLHEP::CLHEP)
-endif()
 if(TARGET RootCnvLib)
     target_sources(GaudiExamples PRIVATE src/MultiInput/DumpAddress.cpp
                                          src/MultiInput/MIReadAlg.cpp
diff --git a/GaudiPython/CMakeLists.txt b/GaudiPython/CMakeLists.txt
index f4cf2186ce7253383b8925764c02a6c36ec8025c..c23e42c2187458e015464b16de874f08662726b2 100644
--- a/GaudiPython/CMakeLists.txt
+++ b/GaudiPython/CMakeLists.txt
@@ -22,10 +22,10 @@ gaudi_add_library(GaudiPythonLib
 if(GAUDI_USE_AIDA)
    target_sources(GaudiPythonLib PRIVATE src/Lib/HistoDecorator.cpp)
    target_link_libraries(GaudiPythonLib PUBLIC AIDA::aida)
-endif()
-if(GAUDI_USE_CLHEP)
-   target_sources(GaudiPythonLib PRIVATE src/Lib/TupleDecorator.cpp)
-   target_link_libraries(GaudiPythonLib PUBLIC CLHEP::CLHEP)
+   if(GAUDI_USE_CLHEP)
+      target_sources(GaudiPythonLib PRIVATE src/Lib/TupleDecorator.cpp)
+      target_link_libraries(GaudiPythonLib PUBLIC CLHEP::CLHEP)
+   endif()
 endif()
 
 # Build the plugin
diff --git a/GaudiPython/dict/kernel.h b/GaudiPython/dict/kernel.h
index 62df3c9564377917969362d3807a459c85df1887..f62a5210b4358310a6ea9228201fe1a86615e424 100644
--- a/GaudiPython/dict/kernel.h
+++ b/GaudiPython/dict/kernel.h
@@ -75,13 +75,13 @@
 #include "GaudiPython/GaudiPython.h"
 #ifdef AIDA_FOUND
 #  include "GaudiPython/HistoDecorator.h"
-#endif // AIDA_FOUND
+#  ifdef CLHEP_FOUND
+#    include "GaudiPython/TupleDecorator.h"
+#  endif // CLHEP_FOUND
+#endif   // AIDA_FOUND
 #include "GaudiPython/Interface.h"
 #include "GaudiPython/Printer.h"
 #include "GaudiPython/Vector.h"
-#ifdef CLHEP_FOUND
-#  include "GaudiPython/TupleDecorator.h"
-#endif // CLHEP_FOUND
 
 #ifdef AIDA_FOUND
 #  include "GaudiAlg/GaudiHistoAlg.h"