set PKG_CONFIG_PATH in cmake
问题 I have built opencv locally and installed it to a local directory ( not the system default ). The opencv.pc is present under a folder pkgconfig in this local folder. How can I find this opencv.pc from cmake, because I want to link and include opencv files from my program. pkg_search_module(<PREFIX> [REQUIRED] [QUIET] <MODULE> [<MODULE>]*) does not have any parameter in which I can force the command to use a specific path ( similiar to HINTS with find_package() ) and not the system default. So