I upvoted the cmake find_package answer, since that is correct. For completeness, if you want to use pkg_check_modules, you should set the PKG_CONFIG_PATH environment variable to include the local pkgconfig folder: