On Thu, Dec 18, 2008 at 8:05 PM, Timothy M. Shead <tsh...@k-3d.com> wrote:

> Pierrick Grasland wrote:
>
> > I'm testing CMake with a little project, but I encounter a problem with
> GTK.
>
> > I was building with autotools and pkg_config before, so I know I have
> > GTK+-2.0 on my system.
>
> Since pkg-config is the "officially supported" way to obtain GTK
> dependencies and compiler flag (I believe it was designed by many of the
> same developers), I find that using CMake's pkg-config module works best
> (even on Win32).  See the documentation at
>
> http://www.cmake.org/cmake/help/cmake2.6docs.html#module:FindPkgConfig
>
> and try something along the lines of
>
> find_package(PkgConfig)
> pkg_check_modules(GTK gtk+-2.0)
> include_directories(${GTK_INCLUDE_DIRS})


I'm not having much luck on my system with pkg-config at the moment.

GTK_INCLUDE_DIRS = C:/Program
GTK_LIBRARY_DIRS = C:/Program

Looks to be a problem with the pkg-config.exe I have and not FindPkgConfig
judging by the output of "pkg-config --cflags gtk+-2.0"

Also, I'm not sure how to configure pkg-config to give me debug libraries.
All I can figure is I would have to perform this step manually in CMake
script?

Aside from the fact that pkg-config will tell me about library dependencies
are there any advantages of using this tool within the context of CMake?  I
only ask because in my experience GTK has been fairly stable in it's
dependencies along the way from 2.0.  I know they added Cairo but exceptions
like that can probably be handled within a properly written and tested
FindGTK2.cmake

-- 
Philip Lowman
_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to