diff --git a/cmake/DD4hepBuild.cmake b/cmake/DD4hepBuild.cmake
index 4f24dc07991933ec879366e56e74aba4c4642008..57fd1b3f7dce16af07562bcc83b4b2c8054d5a4a 100644
--- a/cmake/DD4hepBuild.cmake
+++ b/cmake/DD4hepBuild.cmake
@@ -938,7 +938,14 @@ function( dd4hep_add_library binary building )
         dd4hep_make_unique_list ( sources  VALUES ${sources} )
         dd4hep_debug( "${tag} ${sources}")
         #
-        include_directories ( ${pkg_incs} )
+        FOREACH( INCDIR ${pkg_incs} )
+          string(FIND "${INCDIR}" "${CMAKE_SOURCE_DIR}" out)
+          IF("${out}" EQUAL 0)
+            INCLUDE_DIRECTORIES( ${INCDIR} )
+          ELSE()
+            INCLUDE_DIRECTORIES( SYSTEM ${INCDIR} )
+          ENDIF()
+        ENDFOREACH()
         add_definitions ( ${pkg_defs} )
         #
         add_library ( ${binary} SHARED ${sources} )