find_package() uses home directory


find_package() on OSX seems to use my home directory as a prefix to which it applies its rules for locating a package. I don’t see $HOME listed in the search procedure. Is it missing from the list? If not, which of the 9 items is referring to my home directory in some subtle way?

I’d like to disable the use of $HOME in the search procedure. Can this be done?

Using the --debug-find flag, you can see where the prefix is coming from. This would be needed before knowing how to disable it anyways. I suspect that you might have one of:

  • a CMAKE_PREFIX_PATH setting
  • installed packages (via export(PACKAGE)).