On Thu, Dec 18, 2008 at 8:05 PM, Timothy M. Shead <span dir="ltr"><<a href="mailto:tshead@k-3d.com">tshead@k-3d.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">Pierrick Grasland wrote:<br>
<br>
> I'm testing CMake with a little project, but I encounter a problem with GTK.<br>
<br>
</div><div class="Ih2E3d">> I was building with autotools and pkg_config before, so I know I have<br>
> GTK+-2.0 on my system.<br>
<br>
</div>Since pkg-config is the "officially supported" way to obtain GTK<br>
dependencies and compiler flag (I believe it was designed by many of the<br>
same developers), I find that using CMake's pkg-config module works best<br>
(even on Win32). See the documentation at<br>
<br>
<a href="http://www.cmake.org/cmake/help/cmake2.6docs.html#module:FindPkgConfig" target="_blank">http://www.cmake.org/cmake/help/cmake2.6docs.html#module:FindPkgConfig</a><br>
<br>
and try something along the lines of<br>
<br>
find_package(PkgConfig)<br>
pkg_check_modules(GTK gtk+-2.0)<br>
include_directories(${GTK_INCLUDE_DIRS})</blockquote><div><br>I'm not having much luck on my system with pkg-config at the moment.<br><br>GTK_INCLUDE_DIRS = C:/Program<br>GTK_LIBRARY_DIRS = C:/Program<br><br>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"<br>
<br>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?<br><br>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<br>
</div></div><br>-- <br>Philip Lowman<br>