CMake's configuration files use relative paths and thus trying to use full path of $libDir doesn't work... One solution is to search for `}/lib` instead as that will catch relative paths where the base directory or "prefix" is a variable.