On Fri, Mar 20, 2009 at 10:52 PM, Philip Lowman <phi...@yhbt.com> wrote:
> On Fri, Mar 20, 2009 at 2:38 AM, Dancefire <dancef...@gmail.com> wrote: > >> Hi, Philip, >> >> 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. > > > Thanks for the patches. I'll commit the module to CVS sometime this > weekend with your improvements. Do you think it would be better to put the > HKEY_CURRENT_USER before HKEY_CURRENT_MACHINE to allow a user install to > override the system install? > Yeah, it would be better let HKCU override HKLM. If there is a difference, then the current user most likely intends to use its own installation. > > It is possible to use environment variables to find stuff. The syntax for > this is $ENV{GTKMM_BASEPATH}. I'll put this before all the registry keys. > > That's great, thank you. > >> The following is the path for adding HKEY_CURRENT_USER one: >> >> ======= CUT BEGIN ======= >> --- FindGTK2.orig.cmake 2009-03-20 17:15:44.383749000 +1100 >> +++ FindGTK2.cmake 2009-03-20 17:12:49.334827000 +1100 >> @@ -91,6 +91,8 @@ >> /usr/lib >> [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path]/include >> [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path]/lib >> + [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path]/include >> + [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path]/lib >> PATH_SUFFIXES >> ${_suffixes} >> ) >> @@ -188,6 +190,7 @@ >> NAMES ${_lib_list} >> PATHS >> [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path]/lib >> + [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path]/lib >> ) >> IF(${_expand_vc} AND MSVC) >> >> @@ -199,6 +202,7 @@ >> NAMES ${_libd_list} >> PATHS >> [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path]/lib >> + [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path]/lib >> ) >> IF(NOT GTK2_SKIP_MARK_AS_ADVANCED) >> MARK_AS_ADVANCED(${_var}_DEBUG) >> ======= CUT END ======= >> >> On Fri, Mar 20, 2009 at 2:45 PM, Philip Lowman <phi...@yhbt.com> wrote: >> >>> On Thu, Mar 19, 2009 at 8:24 PM, Dancefire <dancef...@gmail.com> wrote: >>> >>>> I'm using the latest stable version, 2.6.3, which is downloaded from >>>> http://www.cmake.org/cmake/resources/software.html >>> >>> >>> 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"? >>> >> >> 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. >> >> E:\Program Files\gtkmm>pkg-config --libs gtkmm-2.4 >> 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 >> >> E:\Program Files\gtkmm>pkg-config --cflags gtkmm-2.4 >> 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 >> > > Sounds like the pkg-config maintainers would need to fix their code first > to handle spaces or use short paths on WIN32 (C:/Progra~1). > > -- > Philip Lowman > -- Tao Wang
_______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake