On Fri, Dec 19, 2008 at 5:38 AM, Pierrick Grasland <span dir="ltr">&lt;<a href="mailto:pierrick.grasland@gmail.com">pierrick.grasland@gmail.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;">
Hi.<br><br>I though I resolved my problem, but not.<br><br>Actually,&nbsp; my project can link gtk2 with my C source file, with the following include :<div class="Ih2E3d"><br><br>#include &lt;gtk-2.0/gtk/gtk.h&gt;<br><br></div>
But, within gtk.h, gtk includes are linked with the following :<br>
<br>#include &lt;gtk/gdk.h&gt; (for example)<br><br>So, I can&#39;t build since I don&#39;t have access to my widgets.<br><br>Like before, my CMakeLists.txt is something like that :<br><br style="color: rgb(51, 51, 255);">

<div style="margin-left: 40px;"><div class="Ih2E3d"><span style="color: rgb(51, 51, 255);">SET(CMAKE_MODULE_PATH &quot;/home/bobby/workspace/SipSec/gui&quot;)</span><br style="color: rgb(51, 51, 255);"><br style="color: rgb(51, 51, 255);">
<span style="color: rgb(51, 51, 255);">FIND_PACKAGE(GTK2 COMPONENTS gtk)</span><br style="color: rgb(51, 51, 255);">
</div><span style="color: rgb(51, 51, 255);">include_directories (${GTK2_INCLUDE_DIRS})</span><div class="Ih2E3d"><br style="color: rgb(51, 51, 255);"><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">set( GUI_SRC gtkCallback.c interface.c widgetUI.c)</span><br style="color: rgb(51, 51, 255);">

<span style="color: rgb(51, 51, 255);">add_library (sipsecgui&nbsp; ${GUI_SRC} ) </span><br style="color: rgb(51, 51, 255);"><span style="color: rgb(51, 51, 255);">target_link_libraries(sipsecgui ${GTK2_LIBRARIES} ) </span><br>

</div></div><br>How can I tell CMake to link Gtk2 as &lt;gtk/*&gt; instead of &lt;gtk-2.0/gtk/*&gt; ? <br></blockquote><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br><br>Any ideas someone ?</blockquote><div><br>I could probably help you add a hack to FindGTK2 to get what you want but I&#39;m pretty sure nearly everyone else out there uses the #include &lt;gtk/*&gt; syntax.<br><br>
The best thing for you to do would be to fix your #includes and in whatever build system you&#39;re currently using just ensure &quot;/usr/include/gtk-2.0&quot; is in the include path (I suspect it&#39;s already there otherwise you would have had the same compilation issues you have now with your widgets).<br>
<br>If you have a lot of source files you could use the &quot;sed&quot; tool along with a regular expression to accomplish your fix (make backups first obviously).<br><br></div></div>-- <br>Philip Lowman<br>