EXISTS does not honor CMAKE_SYSROOT or CMAKE_FIND_ROOT_PATH
I'm working on cross compiling applications to an ARM platform. I have an image mounted to /L4T, which I set to my CMAKE_SYSROOT and add to my CMAKE_FIND_ROOT_PATH. Now when I try to include Qt5 libraries from the mounted image, they have a macro that checks for files with if(NOT EXISTS "${file}")
Now as far as I can tell, cmake is not appending CMAKE_SYSROOT to this variable when searching for the file, thus why it is complaining that it cannot find the file in my host system when in fact it exists in my target system.
Is this desired behavior? Does that mean that every LibraryConfig.cmake developer needs to keep in my cross compilation as well?