On Thu, Dec 18, 2008 at 8:05 PM, Timothy M. Shead <span dir="ltr">&lt;<a href="mailto:tshead@k-3d.com">tshead@k-3d.com</a>&gt;</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>
&gt; I&#39;m testing CMake with a little project, but I encounter a problem with GTK.<br>
<br>
</div><div class="Ih2E3d">&gt; I was building with autotools and pkg_config before, so I know I have<br>
&gt; GTK+-2.0 on my system.<br>
<br>
</div>Since pkg-config is the &quot;officially supported&quot; 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&#39;s pkg-config module works best<br>
(even on Win32). &nbsp;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&#39;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 &quot;pkg-config --cflags gtk+-2.0&quot;<br>
<br>Also, I&#39;m not sure how to configure pkg-config to give me debug libraries.&nbsp; 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?&nbsp; I only ask because in my experience GTK has been fairly stable in it&#39;s dependencies along the way from 2.0.&nbsp; 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>