diff --git a/core/clib/CMakeLists.txt b/core/clib/CMakeLists.txt
index 2d12d51072d90bb24afa82ac0956577fcce17ab0..8a87997550f6f8ff77b92bd3beb858a1d0480efe 100644
--- a/core/clib/CMakeLists.txt
+++ b/core/clib/CMakeLists.txt
@@ -2,8 +2,8 @@
 # CMakeLists.txt file for building ROOT core/clib package
 ############################################################################
 
-set(Clib_dict_headers ${CMAKE_CURRENT_SOURCE_DIR}/inc/strlcpy.h
-                      ${CMAKE_CURRENT_SOURCE_DIR}/inc/snprintf.h PARENT_SCOPE)
+set(Clib_dict_headers strlcpy.h
+                      snprintf.h PARENT_SCOPE)
 
 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/res)
 
diff --git a/core/imt/CMakeLists.txt b/core/imt/CMakeLists.txt
index ab8f0b3bb21731cabc3b5480e1a400bbad65fb6e..5bbbfc175245ff3ca8d298a10bde9c9079b88372 100644
--- a/core/imt/CMakeLists.txt
+++ b/core/imt/CMakeLists.txt
@@ -15,6 +15,8 @@ if(imt)
   target_include_directories(Imt PRIVATE ${TBB_INCLUDE_DIRS})
   target_link_libraries(Imt PRIVATE ${TBB_LIBRARIES})
 
+  include_directories(BEFORE "inc")
+
   ROOT_GENERATE_DICTIONARY(G__Imt STAGE1
     ROOT/TFuture.hxx
     ROOT/TPoolManager.hxx
diff --git a/graf3d/eve/CMakeLists.txt b/graf3d/eve/CMakeLists.txt
index ee7c2e970b3e413aa364b191106643d98ec8aaad..2f966a73c55f5ada9fb04676a04f8069ebb538c0 100644
--- a/graf3d/eve/CMakeLists.txt
+++ b/graf3d/eve/CMakeLists.txt
@@ -210,6 +210,8 @@ set(EVE_SOURCES
 )
 
 if(MSVC)
+  include_directories(BEFORE "inc")
+
   ROOT_GENERATE_DICTIONARY(G__Eve1
     ${EVE_HEADERS1}
     LINKDEF
diff --git a/io/io/CMakeLists.txt b/io/io/CMakeLists.txt
index 3a8bea0d6ca1873007584ea3beed507023c07674..dd09d63beb9d86ed505bf10f5331388255b2dff0 100644
--- a/io/io/CMakeLists.txt
+++ b/io/io/CMakeLists.txt
@@ -2,6 +2,8 @@
 # CMakeLists.txt file for building ROOT io/io package
 ############################################################################
 
+include_directories(BEFORE "inc")
+
 set(headers ROOT/TBufferMerger.hxx
    TArchiveFile.h
    TBufferFile.h
diff --git a/math/genvector/CMakeLists.txt b/math/genvector/CMakeLists.txt
index f11dbccbfe228aaa4399233a00b083ea75647f8e..d7e94b9ec463fe06102bb9514c8419502a6c2d45 100644
--- a/math/genvector/CMakeLists.txt
+++ b/math/genvector/CMakeLists.txt
@@ -2,6 +2,8 @@
 # CMakeLists.txt file for building ROOT math/genvector package
 ############################################################################
 
+include_directories(BEFORE "inc")
+
 ROOT_GENERATE_DICTIONARY(G__GenVector
     Math/AxisAngle.h
     Math/Boost.h
diff --git a/math/smatrix/CMakeLists.txt b/math/smatrix/CMakeLists.txt
index f1712a9931e4ee77ec3c13beb90b08ab0df96075..c0e2103f6562c87cb04fa50b531043b1843cc220 100644
--- a/math/smatrix/CMakeLists.txt
+++ b/math/smatrix/CMakeLists.txt
@@ -2,6 +2,8 @@
 # CMakeLists.txt file for building ROOT math/smatrix package
 ############################################################################
 
+include_directories(BEFORE "inc")
+
 ROOT_GENERATE_DICTIONARY(G__Smatrix
     Math/BinaryOperators.h
     Math/BinaryOpPolicy.h