<div class="gmail_quote">On Wed, Oct 27, 2010 at 11:54 AM, Ryan Pavlik <span dir="ltr">&lt;<a href="mailto:rpavlik@iastate.edu">rpavlik@iastate.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Wed, Oct 27, 2010 at 9:04 AM, Rolf Eike Beer &lt;<a href="mailto:eike@sf-mail.de">eike@sf-mail.de</a>&gt; wrote:<br>
&gt;&gt; Thanks. The way I understand this is that now instead of<br>
&gt;&gt;<br>
&gt;&gt; include_directories(${GTKMM_INCLUDE_DIRS})<br>
&gt;&gt;<br>
&gt;&gt; i would write something like<br>
&gt;&gt;<br>
&gt;&gt; include_directories(${GTKMM_INCLUDE_DIRS})<br>
&gt;&gt; # and at the end of the file<br>
&gt;&gt; set(INCLUDE_DIRECTORIES ${INCLUDE_DIRECTORIES} PARENT_SCOPE)<br>
&gt;&gt;<br>
&gt;&gt; ? I&#39;d do the same with the LINK_DIRECTORIES, LINK_LIBRARIES property and<br>
&gt;&gt; for all other libraries?<br>
&gt;<br>
&gt; Don&#39;t set LINK_DIRECTORIES and LINK_LIBRARIES. When you are a beginner<br>
&gt; probably every usage of them is wrong.<br>
&gt;<br>
&gt; You simply do<br>
&gt;<br>
&gt; TARGET_LINK_LIBRARIES(mytarget ${GTK_LIBRARIES}) (or however that is called)<br>
&gt;<br>
&gt; The only thing you need to &quot;export upwards&quot; in this case would be the<br>
&gt; GTK_LIBRARIES variable.<br>
&gt;<br>
&gt; Eike<br>
<br>
</div>This is good advice, however, in most cases, since you&#39;re using<br>
pkgconfig directly (which is not the recommended way), that will cause<br>
more failure.  Best thing to do is to create/find a cmake module for<br>
each of those packages, that might use pkgconfig for help finding the<br>
library, but that doesn&#39;t just use what it returns verbatim.<br></blockquote><div><br></div><div>In that light, try out FindGTK2.cmake.  It comes with CMake and supports Gtk/Glade/GtkMM/GladeMM on multiple platforms without relying on pkgconfig.</div>
<div><br></div></div>-- <br>Philip Lowman<br>