Problem using CMake module: gtk

I am trying to compile zzogl using CMake and I continue to run into problems. My first problem stated that I needed pkgconfig, so I installed this, for which I also had to install MacPorts. He then said that I needed the gtk + -2.0 module, so I understood that too. After that install forever, 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 am not very familiar with what I am doing, and it is quite possible that I am doing it all wrong. Can anyone provoke my problem? I use mac with the snow leopard.

+5
source share
2 answers

gtk , sudo port install gtk2? , gtk cmake. , gtk pkg-config :

pkg-config --cflags gtk+-2.0

-

-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

, Linux.

pkg-config , - CMake. cmap MacPorts : sudo port install cmake .

+3

, FindGTK2.cmake, , : pkg-config, . _GTK2_FIND_INCLUDE_DIR /opt/local/include/ , MacPorts, , . , _GTK2_FIND_LIBRARY /opt/local/lib.

, , -, CMake 2.8 0,3-rc1. , . .

find_path find_library. , , -D cmake. - :

cmake ../zzogl -DCMAKE_INCLUDE_PATH=/opt/local/include -DCMAKE_LIBRARY_PATH=/opt/local/lib
+3

All Articles