I'm trying to compile an open source repo, which requires gtk+ in CMakeLists.txt
file:
pkg_check_modules (GTK REQUIRED gtk+-2.0>=2.12)
So I installed gtk+-2.0 with homebrew:
~ brew install gtk
Warning: gtk+-2.24.23 already installed
And to make sure pkg-config
recognizes it, I've tried:
~ pkg-config --modversion gtk+-2.0
2.24.23
Which is perfectly right, but when I configure the project with ccmake ..
, I got the error:
CMake Error at /usr/local/Cellar/cmake/2.8.12.2/share/cmake/Modules/FindPkgConfig.cmake:279 (message):
A required package was not found
Call Stack (most recent call first):
/usr/local/Cellar/cmake/2.8.12.2/share/cmake/Modules/FindPkgConfig.cmake:333 (_pkg_check_modules_internal)
CMakeLists.txt:194 (pkg_check_modules)
How can I fix this?
Have you tried
export PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig:$PKG_CONFIG_PATH
or
export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig"
from https://github.com/naxuroqa/Venom/issues/4#issuecomment-27215983
您所要做的就是安装pkg-config:
brew install pkg-config
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.