Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Issue using CMake : gtk module

I'm attempting to compile zzogl using CMake and I keep running into issues. My first issue stated that I needed pkgconfig, so I installed that, for which I also had to install MacPorts. Then it said I needed gtk+-2.0 module, so I got that too. After that took forever to install, I still get this error:

checking for module 'gtk+-2.0'
package 'gtk+-2.0' not found
CMake Error at /Applications/CMake 2.8-2.app/Contents/share/cmake-2.8/Modules/FindPkgConfig.cmake:266 (message):
A required package was not found
Call Stack (most recent call first):
/Applications/CMake 2.8-2.app/Contents/share/cmake-2.8/Modules/FindPkgConfig.cmake:320 (_pkg_check_modules_internal)
CMakeLists.txt:106 (pkg_check_modules)


CMake Error at cmake/funcs.cmake:32 (message):
gtk not found, aborting...
Call Stack (most recent call first):
cmake/funcs.cmake:23 (reportFound)
CMakeLists.txt:107 (checkFor)


Configuring incomplete, errors occurred!

I'm not really familiar with what I am doin, and it is completely possible I am doing it all wrong. Anyone have any incite into my problem? I am using a mac with snow leopard btw.

like image 531
MBguitarburst Avatar asked Sep 29 '10 00:09

MBguitarburst


1 Answers

Did you install gtk with a command similar to sudo port install gtk2? If yes, then normally gtk should be found by cmake. You can test if gtk is correctly found by pkg-config manually like this:

pkg-config --cflags gtk+-2.0

which should print something like

-pthread -D_REENTRANT -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12

but with different paths, the above is on a Linux system.

If indeed the pkg-config call succeeds, something is wrong with your CMake config. You might then try to install the MacPorts version of cmake like this: sudo port install cmake and use this one.

like image 57
fschmitt Avatar answered Sep 19 '22 01:09

fschmitt