Find the GTK2 widget libraries and several of its other optional components like gtkmm, glade, and glademm.
Specify one or more of the following components as you call this find module. See example below.
The following variables will be defined for your use
Optional variables you can define prior to calling this module:
Call find_package() once. Here are some examples to pick from:
Require GTK 2.6 or later:
find_package(GTK2 2.6 REQUIRED gtk)
Require GTK 2.10 or later and Glade:
find_package(GTK2 2.10 REQUIRED gtk glade)
Search for GTK/GTKMM 2.8 or later:
find_package(GTK2 2.8 COMPONENTS gtk gtkmm)
Use the results:
if(GTK2_FOUND)
include_directories(${GTK2_INCLUDE_DIRS})
add_executable(mygui mygui.cc)
target_link_libraries(mygui ${GTK2_LIBRARIES})
endif()