[CMake] Combine GTK with a Cmake Project

David Boesner david.boesner at googlemail.com
Tue Oct 18 08:07:28 EDT 2011


The error is, that gtk/gtk.h is not found

2011/10/18 Andreas Pakulat <apaku at gmx.de>

> On 18.10.11 13:40:55, David Boesner wrote:
> > Hi,
> >
> > I've tried to combine CMake with GTK. Unfortunately this didn't
> > work. Can you help me?
>
> What is the error? Did you look at the FindGTK2.cmake module to get
> inspiration for a GTK3 module? Is there a particular reason to call the
> module libgtk-3-dev instead of just GTK3?
>
> Looking at the cmake file, I bet the problem is in
> target_link_libraries. You don't seem to understand how the find_package
> command works or the target_link_libraries, please consult the manual
> and other cmake-based projects. In particular target_link_libraries
> expects either a target-name from a add_executable/add_library call or
> linker-flags. You're just giving it some "random" string which won't
> tell the linker what the library is. You probably want to pass
> ${libgtk-dev_LIBRARIES} there.
>
> Andreas
>
> --
>
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20111018/e1766125/attachment.htm>


More information about the CMake mailing list