MantisBT - CMake
View Issue Details
0013519CMakeModulespublic2012-09-05 23:022016-06-10 14:31
Jtappin 
Philip Lowman 
normalminoralways
closedmoved 
x86PC BSD9.0
CMake 2.8.6 
 
0013519: FindGTK2 fails to include libgmodule
When building a package that uses cmake as its build system and includes GTK2, the libgmodule library of glib is not included in the linking list.

The specific example is one of the test codes for gtk-fortran.
On a system with PC-BSD installed. Needs the gtk+ 2 libraries & gfortran.

1) Download gtk-fortran (branch gtk2-old) from github.com:
    git pull https://github.com/jerryd/gtk-fortran.git [^] gtk2-old

2) Build it:
    mkdir build
    cd build
    cmake -D CMAKE_Fortran_COMPILER=gfortran46 ..
    make

3) Run the gtkbuilder2 example:
    ./examples/gtkbuilder2

   The callback routines are not found, c.f. gtkbuilder which does not need libgmodule where they are found.
I have only seen the problem on BSD, not Linux.

No tags attached.
Issue History
2012-09-05 23:02JtappinNew Issue
2012-09-06 12:55Philip LowmanAssigned To => Philip Lowman
2012-09-06 12:55Philip LowmanStatusnew => assigned
2012-10-03 00:19Philip LowmanNote Added: 0031157
2012-10-03 20:49Philip LowmanNote Added: 0031168
2012-10-03 20:49Philip LowmanStatusassigned => feedback
2016-06-10 14:28Kitware RobotNote Added: 0042115
2016-06-10 14:28Kitware RobotStatusfeedback => resolved
2016-06-10 14:28Kitware RobotResolutionopen => moved
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0031157)
Philip Lowman   
2012-10-03 00:19   
Are you linking against GTK2_LIBRARIES (see the top of FindGTK2.cmake for examples of how to use it)?

project(Foo)
find_package(GTK2 REQUIRED gtk)
message(STATUS "GTK2_LIBRARIES = ${GTK2_LIBRARIES}")

should output a list of libraries that includes:
  libfreetype, libglib, libgobject, libgdk_pixbuf, libgdk-x11 (on *nix), libgtk-x11 (on *nix), libcairo, libpango, and libatk.

It's possible that you are doing this correctly and gobject library detection is simply not working on your platform. I did notice that it's not listed as a mandatory requirement for the FIND_PACKAGE_HANDLE_STANDARD_ARGS call at the bottom, but it should be. So it wouldn't be flagged as an error if it were not detected.

If that's the case, please provide details on where the gobject.h & libgobject*.so files are stored on your platform.

Thanks
(0031168)
Philip Lowman   
2012-10-03 20:49   
Putting this issue into feedback state for now. Not clear if it's an issue or not (can't reproduce).
(0042115)
Kitware Robot   
2016-06-10 14:28   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.