Hi, Philip,<br><br>I tested your script FindGTK2.cmake on my computer, I got some problems, but I fixed them. The problem is that I install gtkmm only for current user, so the path can not be found at [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path], so I add some lines for [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path]. And one more suggestion, I don't know how, but if it is possible to use the environment variable "GTKMM_BASEPATH", which contain the gtkmm installation base path and setup by installer, then it will more easily locate the gtkmm.<br>
<br>The following is the path for adding HKEY_CURRENT_USER one:<br><br>======= CUT BEGIN =======<br>--- FindGTK2.orig.cmake 2009-03-20 17:15:44.383749000 +1100<br>+++ FindGTK2.cmake 2009-03-20 17:12:49.334827000 +1100<br>
@@ -91,6 +91,8 @@<br> /usr/lib<br> [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path]/include<br> [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path]/lib<br>+ [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path]/include<br>
+ [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path]/lib<br> PATH_SUFFIXES<br> ${_suffixes}<br> )<br>@@ -188,6 +190,7 @@<br> NAMES ${_lib_list}<br> PATHS<br> [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path]/lib<br>
+ [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path]/lib<br> )<br> IF(${_expand_vc} AND MSVC)<br> <br>@@ -199,6 +202,7 @@<br> NAMES ${_libd_list}<br> PATHS<br> [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path]/lib<br>
+ [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path]/lib<br> )<br> IF(NOT GTK2_SKIP_MARK_AS_ADVANCED)<br> MARK_AS_ADVANCED(${_var}_DEBUG)<br>======= CUT END =======<br><br><div class="gmail_quote">
On Fri, Mar 20, 2009 at 2:45 PM, Philip Lowman <span dir="ltr"><<a href="mailto:philip@yhbt.com">philip@yhbt.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="gmail_quote"><div class="im">On Thu, Mar 19, 2009 at 8:24 PM, Dancefire <span dir="ltr"><<a href="mailto:dancefire@gmail.com" target="_blank">dancefire@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I'm using the latest stable version, 2.6.3, which is downloaded from <a href="http://www.cmake.org/cmake/resources/software.html" target="_blank">http://www.cmake.org/cmake/resources/software.html</a></blockquote></div>
<div>
<br>Yes, the problem is most likely in FindPkgConfig.cmake:136. This module looks like it takes the output from pkg-config --cflags and assumes that each compilation flag is separated by spaces. Can you open a bug for this and include the output from "pkg-config --cflags gtkmm"?<br>
</div></div></blockquote><div><br>I get the output of pkg-config --cflags gtkmm-2.4, however, the problem may be pkg-config. The returned path from pkg-config are broken by space.<br><br>E:\Program Files\gtkmm>pkg-config --libs gtkmm-2.4<br>
Files/gtkmm/lib -LE:/Program -lgtkmm-2.4 -lgiomm-2.4 -lgdkmm-2.4 -latkmm-1.6 -lgtk-win32-2.0 -lpangomm-1.4 -lcairomm-1.0 -lglibmm-2.4 -lsigc-2.0 -lgdk-win32-2.0 -latk-1.0 -lgio-2.0 -lgdk_pixbuf-2.0 -lpangowin32-1.0 -lgdi32 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lintl<br>
<br>E:\Program Files\gtkmm>pkg-config --cflags gtkmm-2.4<br>Files/gtkmm/include/gtkmm-2.4 Files/gtkmm/lib/gtkmm-2.4/include Files/gtkmm/include/glibmm-2.4 Files/gtkmm/lib/glibmm-2.4/include Files/gtkmm/include/giomm-2.4 Files/gtkmm/lib/giomm-2.4/include Files/gtkmm/include/gdkmm-2.4 Files/gtkmm/lib/gdkmm-2.4/include Files/gtkmm/include/pangomm-1.4 Files/gtkmm/include/atkmm-1.6 Files/gtkmm/include/gtk-2.0 -mms-bitfields Files/gtkmm/include/sigc++-2.0 Files/gtkmm/lib/sigc++-2.0/include Files/gtkmm/include/glib-2.0 Files/gtkmm/lib/glib-2.0/include Files/gtkmm/lib/gtk-2.0/include Files/gtkmm/include/cairomm-1.0 Files/gtkmm/include/pango-1.0 Files/gtkmm/include/cairo Files/gtkmm/include/libpng12 Files/gtkmm/include/atk-1.0 -IE:/Program<br>
<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="gmail_quote"><div><br>Not sure how best to fix the issue if it is what I suspect it is.<br>
</div><div class="im"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Yeah, it is might be a bug in FindPkgConfig.cmake. I will have a try of your script. And hope it can be integrated in to CMake modules if it works better.</blockquote>
</div><div><br>I have an outstanding action item to check it into CVS and promise certainly do so if it works for you too. :)<br><br>I have been meaning to add version checking and try it out on some older systems with GTK 2.2 or 2.6 on them but I haven't gotten around to it yet because my RHEL3 box died at work. Part of the problem of not using pkg-config is that you also loose the dependency list so the module needs to know things like "not having cairo on GTK < 2.x is not a big deal", etc.<br>
</div></div><br>-- <br><font color="#888888">Philip Lowman<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Tao Wang<br>