Per a Slack conversation it looks like the way we use HINTS in find_package(), including fixed path guesses like /usr/local/zeek/bin, can have the undesired effect of overriding system-level defaults for locating a program — here, picking up zeek-config straight from the user's PATH environment.
The docs suggest that we should use HINTS for paths derived from other variables (here, relative to ${ZEEK_ROOT_DIR}), while we should provide absolute paths via PATHS, which will come last in the resolution order.
There are several other uses of HINTS in our cmake tree that we should review while we're at it.
cmake gurus, feel free to chime in...
Per a Slack conversation it looks like the way we use
HINTSinfind_package(), including fixed path guesses like/usr/local/zeek/bin, can have the undesired effect of overriding system-level defaults for locating a program — here, picking upzeek-configstraight from the user'sPATHenvironment.The docs suggest that we should use
HINTSfor paths derived from other variables (here, relative to${ZEEK_ROOT_DIR}), while we should provide absolute paths viaPATHS, which will come last in the resolution order.There are several other uses of
HINTSin our cmake tree that we should review while we're at it.cmake gurus, feel free to chime in...