cmake 2.8.0, FindGTK2 on mac

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

cmake 2.8.0, FindGTK2 on mac

Aleksander Demko
I can't seem to get FindGTK2 working under a Mac. I've installed the
latest shipping library for mac from gtk.org, and even with a
CMakeLists.txt file that has nothing but "FIND_PACKAGE(GTK2)", I get
the following errors:


CMake Error at /Applications/CMake
2.8-0.app/Contents/share/cmake-2.8/Modules/FindGTK2.cmake:93 (file):
  file Internal CMake error when trying to open file:
  /Library/Frameworks/Gtk.framework/Headers/gtk/gtk/gtkversion.h for reading.
Call Stack (most recent call first):
  /Applications/CMake
2.8-0.app/Contents/share/cmake-2.8/Modules/FindGTK2.cmake:467
(_GTK2_GET_VERSION)
  CMakeLists.txt:2 (FIND_PACKAGE)


-- Some or all of the gtk libraries were not found.  (missing:
GTK2_GTK_LIBRARY GTK2_GLIB_LIBRARY GTK2_GDK_LIBRARY)

There seems to be one extra gtk/ in the above path. I'm new to mac
development, but it seems there are some interesting path
manipulations that are done when searching for header files in
framework directories. I'm just not sure how to go about fixing this.

Any ideas would be super.

Thanks!
_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: cmake 2.8.0, FindGTK2 on mac

Philip Lowman

Hi, I wrote FindGTK2.

You might try removing the "gtk/" from line 350?  Line 345 where the include path is searched for may also need to be modified...

I don't have a MAC so if anyone has any better ideas, help would be appreciated.

On Dec 1, 2009 1:27 PM, "Aleksander Demko" <[hidden email]> wrote:

I can't seem to get FindGTK2 working under a Mac. I've installed the
latest shipping library for mac from gtk.org, and even with a
CMakeLists.txt file that has nothing but "FIND_PACKAGE(GTK2)", I get
the following errors:


CMake Error at /Applications/CMake
2.8-0.app/Contents/share/cmake-2.8/Modules/FindGTK2.cmake:93 (file):
 file Internal CMake error when trying to open file:
 /Library/Frameworks/Gtk.framework/Headers/gtk/gtk/gtkversion.h for reading.
Call Stack (most recent call first):
 /Applications/CMake
2.8-0.app/Contents/share/cmake-2.8/Modules/FindGTK2.cmake:467
(_GTK2_GET_VERSION)
 CMakeLists.txt:2 (FIND_PACKAGE)


-- Some or all of the gtk libraries were not found.  (missing:
GTK2_GTK_LIBRARY GTK2_GLIB_LIBRARY GTK2_GDK_LIBRARY)

There seems to be one extra gtk/ in the above path. I'm new to mac
development, but it seems there are some interesting path
manipulations that are done when searching for header files in
framework directories. I'm just not sure how to go about fixing this.

Any ideas would be super.

Thanks!
_______________________________________________
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


_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: cmake 2.8.0, FindGTK2 on mac

Aleksander Demko
That doesn't seem to help. But yeah, it seems the find_path returns
the extra gtk... if I message() the contents of GTK2_GTK_INCLUDE_DIR I
get /Library/Frameworks/Gtk.framework/Headers/gtk

While gtkversion's full name is
/Library/Frameworks/Gtk.framework/Headers/gtk/gtkversion.h

Maybe some kind of if(APPLE) then apple "../" to alot of these paths
are in order. I'm not sure what approach to take that would require
the least amount of hacking.

I think find_path is probably trying to be compatible with the mac
style of framework installs, which may put a part of the include
(gtk/) as part of the base framework name (Gtk.framework). This is a
pure guess though, but man gcc under the -F switch has some info on
this.

On Tue, Dec 1, 2009 at 2:19 PM, Philip Lowman <[hidden email]> wrote:

> Hi, I wrote FindGTK2.
>
> You might try removing the "gtk/" from line 350?  Line 345 where the include
> path is searched for may also need to be modified...
>
> I don't have a MAC so if anyone has any better ideas, help would be
> appreciated.
>
> On Dec 1, 2009 1:27 PM, "Aleksander Demko" <[hidden email]> wrote:
>
> I can't seem to get FindGTK2 working under a Mac. I've installed the
> latest shipping library for mac from gtk.org, and even with a
> CMakeLists.txt file that has nothing but "FIND_PACKAGE(GTK2)", I get
> the following errors:
>
>
> CMake Error at /Applications/CMake
> 2.8-0.app/Contents/share/cmake-2.8/Modules/FindGTK2.cmake:93 (file):
>  file Internal CMake error when trying to open file:
>  /Library/Frameworks/Gtk.framework/Headers/gtk/gtk/gtkversion.h for reading.
> Call Stack (most recent call first):
>  /Applications/CMake
> 2.8-0.app/Contents/share/cmake-2.8/Modules/FindGTK2.cmake:467
> (_GTK2_GET_VERSION)
>  CMakeLists.txt:2 (FIND_PACKAGE)
>
>
> -- Some or all of the gtk libraries were not found.  (missing:
> GTK2_GTK_LIBRARY GTK2_GLIB_LIBRARY GTK2_GDK_LIBRARY)
>
> There seems to be one extra gtk/ in the above path. I'm new to mac
> development, but it seems there are some interesting path
> manipulations that are done when searching for header files in
> framework directories. I'm just not sure how to go about fixing this.
>
> Any ideas would be super.
>
> Thanks!
> _______________________________________________
> 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
>
_______________________________________________
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