diff --git a/cmake/modules/RootNewMacros.cmake b/cmake/modules/RootNewMacros.cmake index 63ada61eca379204262f5abe43979ea8ded40bc7..39bb7eb1661ec9981afa2ca606caf1f271062dd0 100644 --- a/cmake/modules/RootNewMacros.cmake +++ b/cmake/modules/RootNewMacros.cmake @@ -243,7 +243,11 @@ function(ROOT_GENERATE_DICTIONARY dictionary) endif() endforeach() else() - find_file(headerFile ${fp} HINTS ${incdirs} NO_DEFAULT_PATH NO_SYSTEM_ENVIRONMENT_PATH) + if(IS_ABSOLUTE ${fp}) + set(headerFile ${fp}) + else() + find_file(headerFile ${fp} HINTS ${incdirs} NO_DEFAULT_PATH NO_SYSTEM_ENVIRONMENT_PATH) + endif() if(NOT headerFile) message(FATAL_ERROR "Cannot find header ${fp} to generate dictionary ${dictionary} for. Did you forget to set the INCLUDE_DIRECTORIES property for the current directory?") endif()