set PKG_CONFIG_PATH in cmake

后端 未结 2 1932
隐瞒了意图╮
隐瞒了意图╮ 2021-02-13 15:07

I have built opencv locally and installed it to a local directory (not the system default ). opencv.pc is present under a folder pkgconfig in this local folder. How

2条回答
  •  醉话见心
    2021-02-13 15:52

    You could set PKG_CONFIG_PATH with the CMake line:

    set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:/my/path/to/pkgconfig")
    

    I did this workaround in this file

    Interestingly, it seems CMake 3.1 extends PKG_CONFIG_PATH with some CMake variable see: https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3df51470

提交回复
热议问题