filter out duplicate CMAKE_PREFIX_PATHs before searching for env hooks