The package ${PORT} is compatible with CMake if you set the OpenCV_DIR *before* the find_package call set(OpenCV_DIR "${CURRENT_INSTALLED_DIR}/share/${PORT}") find_package(OpenCV REQUIRED)