build: Fix CMAKE_PREFIX_PATH and install when using metadata
metadata: Adding preliminary support for independent metadata profiles