diff --git a/cmake/find_package_ROOT.cmake b/cmake/find_package_ROOT.cmake index 6a40d24792a227b1b0e6c6e8ca4fb82e23163ac4..1257aecffe596291c5b45632a9a3155144b8944f 100644 --- a/cmake/find_package_ROOT.cmake +++ b/cmake/find_package_ROOT.cmake @@ -21,7 +21,9 @@ if(EXISTS ${root-config}) list(APPEND ROOT_HINTS ${ROOT_PREFIX}) endif() -find_package(ROOT QUIET HINTS ${ROOT_HINTS}) +if(NOT CMAKE_VERSION VERSION_LESS 3.0.0) + find_package(ROOT QUIET HINTS ${ROOT_HINTS}) +endif() if(ROOT_FOUND) #Use variables provided by ROOTConfig.cmake #Remove some extra flags from ROOT_DEFINITIONS