<div class="gmail_quote">On Wed, Oct 27, 2010 at 11:54 AM, Ryan Pavlik <span dir="ltr"><<a href="mailto:rpavlik@iastate.edu">rpavlik@iastate.edu</a>></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 <<a href="mailto:eike@sf-mail.de">eike@sf-mail.de</a>> wrote:<br>
>> Thanks. The way I understand this is that now instead of<br>
>><br>
>> include_directories(${GTKMM_INCLUDE_DIRS})<br>
>><br>
>> i would write something like<br>
>><br>
>> include_directories(${GTKMM_INCLUDE_DIRS})<br>
>> # and at the end of the file<br>
>> set(INCLUDE_DIRECTORIES ${INCLUDE_DIRECTORIES} PARENT_SCOPE)<br>
>><br>
>> ? I'd do the same with the LINK_DIRECTORIES, LINK_LIBRARIES property and<br>
>> for all other libraries?<br>
><br>
> Don't set LINK_DIRECTORIES and LINK_LIBRARIES. When you are a beginner<br>
> probably every usage of them is wrong.<br>
><br>
> You simply do<br>
><br>
> TARGET_LINK_LIBRARIES(mytarget ${GTK_LIBRARIES}) (or however that is called)<br>
><br>
> The only thing you need to "export upwards" in this case would be the<br>
> GTK_LIBRARIES variable.<br>
><br>
> Eike<br>
<br>
</div>This is good advice, however, in most cases, since you'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'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>