Interesting question, I haven’t thought about this before. But the way I read the documentation now actually makes sense to me: Xxx_ROOT_DIR
is the result variable that is (should be, for the sake of consistency/convention) set by the FindXxx.cmake
module when/if Xxx
is found, and Xxx_ROOT is the variable that FindXxx.cmake
module will use to get a list of paths/prefixes of potential Xxx
whereabouts to know where to look for it.
So, in other words (and with the right “order of use”):
Xxx_ROOT
contains the path(s) of where to look forXxx
;FindXxx.cmake
attempts to findXxx
using those paths;- If
Xxx
is found, thenXxx_ROOT_DIR
is set.