2 # This module can find the GTK2 widget libraries and several of its other
3 # optional components like gtkmm, glade, and glademm.
5 # NOTE: If you intend to use version checking, CMake 2.6.2 or later is
8 # Specify one or more of the following components
9 # as you call this find module. See example below.
16 # The following variables will be defined for your use
18 # GTK2_FOUND - Were all of your specified components found?
19 # GTK2_INCLUDE_DIRS - All include directories
20 # GTK2_LIBRARIES - All libraries
22 # GTK2_VERSION - The version of GTK2 found (x.y.z)
23 # GTK2_MAJOR_VERSION - The major version of GTK2
24 # GTK2_MINOR_VERSION - The minor version of GTK2
25 # GTK2_PATCH_VERSION - The patch version of GTK2
27 # Optional variables you can define prior to calling this module:
29 # GTK2_DEBUG - Enables verbose debugging of the module
30 # GTK2_SKIP_MARK_AS_ADVANCED - Disable marking cache variables as advanced
31 # GTK2_ADDITIONAL_SUFFIXES - Allows defining additional directories to
32 # search for include files
37 # Call find_package() once, here are some examples to pick from:
39 # Require GTK 2.6 or later
40 # find_package(GTK2 2.6 REQUIRED gtk)
42 # Require GTK 2.10 or later and Glade
43 # find_package(GTK2 2.10 REQUIRED gtk glade)
45 # Search for GTK/GTKMM 2.8 or later
46 # find_package(GTK2 2.8 COMPONENTS gtk gtkmm)
49 # include_directories(${GTK2_INCLUDE_DIRS})
50 # add_executable(mygui mygui.cc)
51 # target_link_libraries(mygui ${GTK2_LIBRARIES})
55 #=============================================================================
56 # Copyright 2009 Kitware, Inc.
57 # Copyright 2008-2012 Philip Lowman <philip@yhbt.com>
59 # Distributed under the OSI-approved BSD License (the "License");
60 # see accompanying file Copyright.txt for details.
62 # This software is distributed WITHOUT ANY WARRANTY; without even the
63 # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
64 # See the License for more information.
65 #=============================================================================
66 # (To distribute this file outside of CMake, substitute the full
67 # License text for the above reference.)
69 # Version 1.4 (10/4/2012) (CMake 2.8.10)
70 # * 12596: Missing paths for FindGTK2 on NetBSD
71 # * 12049: Fixed detection of GTK include files in the lib folder on
73 # Version 1.3 (11/9/2010) (CMake 2.8.4)
74 # * 11429: Add support for detecting GTK2 built with Visual Studio 10.
75 # Thanks to Vincent Levesque for the patch.
76 # Version 1.2 (8/30/2010) (CMake 2.8.3)
77 # * Merge patch for detecting gdk-pixbuf library (split off
78 # from core GTK in 2.21). Thanks to Vincent Untz for the patch
79 # and Ricardo Cruz for the heads up.
80 # Version 1.1 (8/19/2010) (CMake 2.8.3)
81 # * Add support for detecting GTK2 under macports (thanks to Gary Kramlich)
82 # Version 1.0 (8/12/2010) (CMake 2.8.3)
83 # * Add support for detecting new pangommconfig.h header file
84 # (Thanks to Sune Vuorela & the Debian Project for the patch)
85 # * Add support for detecting fontconfig.h header
86 # * Call find_package(Freetype) since it's required
87 # * Add support for allowing users to add additional library directories
88 # via the GTK2_ADDITIONAL_SUFFIXES variable (kind of a future-kludge in
89 # case the GTK developers change versions on any of the directories in the
91 # Version 0.8 (1/4/2010)
92 # * Get module working under MacOSX fink by adding /sw/include, /sw/lib
93 # to PATHS and the gobject library
94 # Version 0.7 (3/22/09)
95 # * Checked into CMake CVS
96 # * Added versioning support
97 # * Module now defaults to searching for GTK if COMPONENTS not specified.
98 # * Added HKCU prior to HKLM registry key and GTKMM specific environment
99 # variable as per mailing list discussion.
100 # * Added lib64 to include search path and a few other search paths where GTK
101 # may be installed on Unix systems.
102 # * Switched to lowercase CMake commands
103 # * Prefaced internal variables with _GTK2 to prevent collision
104 # * Changed internal macros to functions
105 # * Enhanced documentation
106 # Version 0.6 (1/8/08)
107 # Added GTK2_SKIP_MARK_AS_ADVANCED option
108 # Version 0.5 (12/19/08)
109 # Second release to cmake mailing list
111 #=============================================================
113 # Internal function to parse the version number in gtkversion.h
114 # _OUT_major = Major version number
115 # _OUT_minor = Minor version number
116 # _OUT_micro = Micro version number
117 # _gtkversion_hdr = Header file to parse
118 #=============================================================
119 function(_GTK2_GET_VERSION _OUT_major _OUT_minor _OUT_micro _gtkversion_hdr)
120 file(STRINGS ${_gtkversion_hdr} _contents REGEX "#define GTK_M[A-Z]+_VERSION[ \t]+")
122 string(REGEX REPLACE ".*#define GTK_MAJOR_VERSION[ \t]+\\(([0-9]+)\\).*" "\\1" ${_OUT_major} "${_contents}")
123 string(REGEX REPLACE ".*#define GTK_MINOR_VERSION[ \t]+\\(([0-9]+)\\).*" "\\1" ${_OUT_minor} "${_contents}")
124 string(REGEX REPLACE ".*#define GTK_MICRO_VERSION[ \t]+\\(([0-9]+)\\).*" "\\1" ${_OUT_micro} "${_contents}")
126 if(NOT ${_OUT_major} MATCHES "[0-9]+")
127 message(FATAL_ERROR "Version parsing failed for GTK2_MAJOR_VERSION!")
129 if(NOT ${_OUT_minor} MATCHES "[0-9]+")
130 message(FATAL_ERROR "Version parsing failed for GTK2_MINOR_VERSION!")
132 if(NOT ${_OUT_micro} MATCHES "[0-9]+")
133 message(FATAL_ERROR "Version parsing failed for GTK2_MICRO_VERSION!")
136 set(${_OUT_major} ${${_OUT_major}} PARENT_SCOPE)
137 set(${_OUT_minor} ${${_OUT_minor}} PARENT_SCOPE)
138 set(${_OUT_micro} ${${_OUT_micro}} PARENT_SCOPE)
140 message(FATAL_ERROR "Include file ${_gtkversion_hdr} does not exist")
144 #=============================================================
145 # _GTK2_FIND_INCLUDE_DIR
146 # Internal function to find the GTK include directories
147 # _var = variable to set
148 # _hdr = header file to look for
149 #=============================================================
150 function(_GTK2_FIND_INCLUDE_DIR _var _hdr)
153 message(STATUS "[FindGTK2.cmake:${CMAKE_CURRENT_LIST_LINE}] "
154 "_GTK2_FIND_INCLUDE_DIR( ${_var} ${_hdr} )")
158 # If these ever change, things will break.
159 ${GTK2_ADDITIONAL_SUFFIXES}
179 # NOTE: The following suffixes cause searching for header files in both of
182 # /usr/lib/<pkg>/include
186 foreach(_d ${_gtk_packages})
187 list(APPEND _suffixes ${_d})
188 list(APPEND _suffixes ${_d}/include) # for /usr/lib/gtk-2.0/include
192 message(STATUS "[FindGTK2.cmake:${CMAKE_CURRENT_LIST_LINE}] "
193 "include suffixes = ${_suffixes}")
196 if(CMAKE_LIBRARY_ARCHITECTURE)
197 set(_gtk2_arch_dir /usr/lib/${CMAKE_LIBRARY_ARCHITECTURE})
199 message(STATUS "Adding ${_gtk2_arch_dir} to search path for multiarch support")
202 find_path(${_var} ${_hdr}
218 /usr/pkg/include/glib
219 $ENV{GTKMM_BASEPATH}/include
220 $ENV{GTKMM_BASEPATH}/lib
221 [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path]/include
222 [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path]/lib
223 [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path]/include
224 [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path]/lib
230 set(GTK2_INCLUDE_DIRS ${GTK2_INCLUDE_DIRS} ${${_var}} PARENT_SCOPE)
231 if(NOT GTK2_SKIP_MARK_AS_ADVANCED)
232 mark_as_advanced(${_var})
238 #=============================================================
240 # Internal function to find libraries packaged with GTK2
241 # _var = library variable to create
242 #=============================================================
243 function(_GTK2_FIND_LIBRARY _var _lib _expand_vc _append_version)
246 message(STATUS "[FindGTK2.cmake:${CMAKE_CURRENT_LIST_LINE}] "
247 "_GTK2_FIND_LIBRARY( ${_var} ${_lib} ${_expand_vc} ${_append_version} )")
250 # Not GTK versions per se but the versions encoded into Windows
251 # import libraries (GtkMM 2.14.1 has a gtkmm-vc80-2_4.lib for example)
252 # Also the MSVC libraries use _ for . (this is handled below)
253 set(_versions 2.20 2.18 2.16 2.14 2.12
254 2.10 2.8 2.6 2.4 2.2 2.0
255 1.20 1.18 1.16 1.14 1.12
256 1.10 1.8 1.6 1.4 1.2 1.0)
261 set(_library ${_lib})
263 if(_expand_vc AND MSVC)
264 # Add vc80/vc90/vc100 midfixes
266 set(_library ${_library}-vc80)
268 set(_library ${_library}-vc90)
270 set(_library ${_library}-vc100)
272 set(_library_d ${_library}-d)
276 message(STATUS "[FindGTK2.cmake:${CMAKE_CURRENT_LIST_LINE}] "
277 "After midfix addition = ${_library} and ${_library_d}")
283 foreach(_ver ${_versions})
284 list(APPEND _lib_list "${_library}-${_ver}")
285 list(APPEND _libd_list "${_library_d}-${_ver}")
288 set(_lib_list ${_library})
289 set(_libd_list ${_library_d})
293 message(STATUS "[FindGTK2.cmake:${CMAKE_CURRENT_LIST_LINE}] "
294 "library list = ${_lib_list} and library debug list = ${_libd_list}")
297 # For some silly reason the MSVC libraries use _ instead of .
298 # in the version fields
299 if(_expand_vc AND MSVC)
300 set(_no_dots_lib_list)
301 set(_no_dots_libd_list)
302 foreach(_l ${_lib_list})
303 string(REPLACE "." "_" _no_dots_library ${_l})
304 list(APPEND _no_dots_lib_list ${_no_dots_library})
307 set(_no_dots_libsd_list)
308 foreach(_l ${_libd_list})
309 string(REPLACE "." "_" _no_dots_libraryd ${_l})
310 list(APPEND _no_dots_libd_list ${_no_dots_libraryd})
313 # Copy list back to original names
314 set(_lib_list ${_no_dots_lib_list})
315 set(_libd_list ${_no_dots_libd_list})
319 message(STATUS "[FindGTK2.cmake:${CMAKE_CURRENT_LIST_LINE}] "
320 "While searching for ${_var}, our proposed library list is ${_lib_list}")
329 $ENV{GTKMM_BASEPATH}/lib
330 [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path]/lib
331 [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path]/lib
334 if(_expand_vc AND MSVC)
336 message(STATUS "[FindGTK2.cmake:${CMAKE_CURRENT_LIST_LINE}] "
337 "While searching for ${_var}_DEBUG our proposed library list is ${_libd_list}")
340 find_library(${_var}_DEBUG
343 $ENV{GTKMM_BASEPATH}/lib
344 [HKEY_CURRENT_USER\\SOFTWARE\\gtkmm\\2.4;Path]/lib
345 [HKEY_LOCAL_MACHINE\\SOFTWARE\\gtkmm\\2.4;Path]/lib
348 if(${_var} AND ${_var}_DEBUG)
349 if(NOT GTK2_SKIP_MARK_AS_ADVANCED)
350 mark_as_advanced(${_var}_DEBUG)
352 set(GTK2_LIBRARIES ${GTK2_LIBRARIES} optimized ${${_var}} debug ${${_var}_DEBUG})
353 set(GTK2_LIBRARIES ${GTK2_LIBRARIES} PARENT_SCOPE)
356 if(NOT GTK2_SKIP_MARK_AS_ADVANCED)
357 mark_as_advanced(${_var})
359 set(GTK2_LIBRARIES ${GTK2_LIBRARIES} ${${_var}})
360 set(GTK2_LIBRARIES ${GTK2_LIBRARIES} PARENT_SCOPE)
361 # Set debug to release
362 set(${_var}_DEBUG ${${_var}})
363 set(${_var}_DEBUG ${${_var}} PARENT_SCOPE)
367 #=============================================================
374 set(GTK2_INCLUDE_DIRS)
377 if(NOT GTK2_FIND_COMPONENTS)
378 # Assume they only want GTK
379 set(GTK2_FIND_COMPONENTS gtk)
383 # If specified, enforce version number
385 if(GTK2_FIND_VERSION)
386 cmake_minimum_required(VERSION 2.6.2)
387 set(GTK2_FAILED_VERSION_CHECK true)
389 message(STATUS "[FindGTK2.cmake:${CMAKE_CURRENT_LIST_LINE}] "
390 "Searching for version ${GTK2_FIND_VERSION}")
392 _GTK2_FIND_INCLUDE_DIR(GTK2_GTK_INCLUDE_DIR gtk/gtk.h)
393 if(GTK2_GTK_INCLUDE_DIR)
394 _GTK2_GET_VERSION(GTK2_MAJOR_VERSION
397 ${GTK2_GTK_INCLUDE_DIR}/gtk/gtkversion.h)
399 ${GTK2_MAJOR_VERSION}.${GTK2_MINOR_VERSION}.${GTK2_PATCH_VERSION})
400 if(GTK2_FIND_VERSION_EXACT)
401 if(GTK2_VERSION VERSION_EQUAL GTK2_FIND_VERSION)
402 set(GTK2_FAILED_VERSION_CHECK false)
405 if(GTK2_VERSION VERSION_EQUAL GTK2_FIND_VERSION OR
406 GTK2_VERSION VERSION_GREATER GTK2_FIND_VERSION)
407 set(GTK2_FAILED_VERSION_CHECK false)
411 # If we can't find the GTK include dir, we can't do version checking
412 if(GTK2_FIND_REQUIRED AND NOT GTK2_FIND_QUIETLY)
413 message(FATAL_ERROR "Could not find GTK2 include directory")
418 if(GTK2_FAILED_VERSION_CHECK)
419 if(GTK2_FIND_REQUIRED AND NOT GTK2_FIND_QUIETLY)
420 if(GTK2_FIND_VERSION_EXACT)
421 message(FATAL_ERROR "GTK2 version check failed. Version ${GTK2_VERSION} was found, version ${GTK2_FIND_VERSION} is needed exactly.")
423 message(FATAL_ERROR "GTK2 version check failed. Version ${GTK2_VERSION} was found, at least version ${GTK2_FIND_VERSION} is required")
427 # If the version check fails, exit out of the module here
433 # Find all components
436 find_package(Freetype)
437 list(APPEND GTK2_INCLUDE_DIRS ${FREETYPE_INCLUDE_DIRS})
438 list(APPEND GTK2_LIBRARIES ${FREETYPE_LIBRARIES})
440 foreach(_GTK2_component ${GTK2_FIND_COMPONENTS})
441 if(_GTK2_component STREQUAL "gtk")
442 _GTK2_FIND_INCLUDE_DIR(GTK2_GLIB_INCLUDE_DIR glib.h)
443 _GTK2_FIND_INCLUDE_DIR(GTK2_GLIBCONFIG_INCLUDE_DIR glibconfig.h)
444 _GTK2_FIND_LIBRARY (GTK2_GLIB_LIBRARY glib false true)
446 _GTK2_FIND_INCLUDE_DIR(GTK2_GOBJECT_INCLUDE_DIR gobject/gobject.h)
447 _GTK2_FIND_LIBRARY (GTK2_GOBJECT_LIBRARY gobject false true)
449 _GTK2_FIND_INCLUDE_DIR(GTK2_GDK_PIXBUF_INCLUDE_DIR gdk-pixbuf/gdk-pixbuf.h)
450 _GTK2_FIND_LIBRARY (GTK2_GDK_PIXBUF_LIBRARY gdk_pixbuf false true)
452 _GTK2_FIND_INCLUDE_DIR(GTK2_GDK_INCLUDE_DIR gdk/gdk.h)
453 _GTK2_FIND_INCLUDE_DIR(GTK2_GDKCONFIG_INCLUDE_DIR gdkconfig.h)
454 _GTK2_FIND_INCLUDE_DIR(GTK2_GTK_INCLUDE_DIR gtk/gtk.h)
457 _GTK2_FIND_LIBRARY (GTK2_GDK_LIBRARY gdk-x11 false true)
458 _GTK2_FIND_LIBRARY (GTK2_GTK_LIBRARY gtk-x11 false true)
460 _GTK2_FIND_LIBRARY (GTK2_GDK_LIBRARY gdk-win32 false true)
461 _GTK2_FIND_LIBRARY (GTK2_GTK_LIBRARY gtk-win32 false true)
464 _GTK2_FIND_INCLUDE_DIR(GTK2_CAIRO_INCLUDE_DIR cairo.h)
465 _GTK2_FIND_LIBRARY (GTK2_CAIRO_LIBRARY cairo false false)
467 _GTK2_FIND_INCLUDE_DIR(GTK2_FONTCONFIG_INCLUDE_DIR fontconfig/fontconfig.h)
469 _GTK2_FIND_INCLUDE_DIR(GTK2_PANGO_INCLUDE_DIR pango/pango.h)
470 _GTK2_FIND_LIBRARY (GTK2_PANGO_LIBRARY pango false true)
472 _GTK2_FIND_INCLUDE_DIR(GTK2_ATK_INCLUDE_DIR atk/atk.h)
473 _GTK2_FIND_LIBRARY (GTK2_ATK_LIBRARY atk false true)
476 elseif(_GTK2_component STREQUAL "gtkmm")
478 _GTK2_FIND_INCLUDE_DIR(GTK2_GLIBMM_INCLUDE_DIR glibmm.h)
479 _GTK2_FIND_INCLUDE_DIR(GTK2_GLIBMMCONFIG_INCLUDE_DIR glibmmconfig.h)
480 _GTK2_FIND_LIBRARY (GTK2_GLIBMM_LIBRARY glibmm true true)
482 _GTK2_FIND_INCLUDE_DIR(GTK2_GDKMM_INCLUDE_DIR gdkmm.h)
483 _GTK2_FIND_INCLUDE_DIR(GTK2_GDKMMCONFIG_INCLUDE_DIR gdkmmconfig.h)
484 _GTK2_FIND_LIBRARY (GTK2_GDKMM_LIBRARY gdkmm true true)
486 _GTK2_FIND_INCLUDE_DIR(GTK2_GTKMM_INCLUDE_DIR gtkmm.h)
487 _GTK2_FIND_INCLUDE_DIR(GTK2_GTKMMCONFIG_INCLUDE_DIR gtkmmconfig.h)
488 _GTK2_FIND_LIBRARY (GTK2_GTKMM_LIBRARY gtkmm true true)
490 _GTK2_FIND_INCLUDE_DIR(GTK2_CAIROMM_INCLUDE_DIR cairomm/cairomm.h)
491 _GTK2_FIND_INCLUDE_DIR(GTK2_CAIROMMCONFIG_INCLUDE_DIR cairommconfig.h)
492 _GTK2_FIND_LIBRARY (GTK2_CAIROMM_LIBRARY cairomm true true)
494 _GTK2_FIND_INCLUDE_DIR(GTK2_PANGOMM_INCLUDE_DIR pangomm.h)
495 _GTK2_FIND_INCLUDE_DIR(GTK2_PANGOMMCONFIG_INCLUDE_DIR pangommconfig.h)
496 _GTK2_FIND_LIBRARY (GTK2_PANGOMM_LIBRARY pangomm true true)
498 _GTK2_FIND_INCLUDE_DIR(GTK2_SIGC++_INCLUDE_DIR sigc++/sigc++.h)
499 _GTK2_FIND_INCLUDE_DIR(GTK2_SIGC++CONFIG_INCLUDE_DIR sigc++config.h)
500 _GTK2_FIND_LIBRARY (GTK2_SIGC++_LIBRARY sigc true true)
502 _GTK2_FIND_INCLUDE_DIR(GTK2_GIOMM_INCLUDE_DIR giomm.h)
503 _GTK2_FIND_INCLUDE_DIR(GTK2_GIOMMCONFIG_INCLUDE_DIR giommconfig.h)
504 _GTK2_FIND_LIBRARY (GTK2_GIOMM_LIBRARY giomm true true)
506 _GTK2_FIND_INCLUDE_DIR(GTK2_ATKMM_INCLUDE_DIR atkmm.h)
507 _GTK2_FIND_LIBRARY (GTK2_ATKMM_LIBRARY atkmm true true)
509 elseif(_GTK2_component STREQUAL "glade")
511 _GTK2_FIND_INCLUDE_DIR(GTK2_GLADE_INCLUDE_DIR glade/glade.h)
512 _GTK2_FIND_LIBRARY (GTK2_GLADE_LIBRARY glade false true)
514 elseif(_GTK2_component STREQUAL "glademm")
516 _GTK2_FIND_INCLUDE_DIR(GTK2_GLADEMM_INCLUDE_DIR libglademm.h)
517 _GTK2_FIND_INCLUDE_DIR(GTK2_GLADEMMCONFIG_INCLUDE_DIR libglademmconfig.h)
518 _GTK2_FIND_LIBRARY (GTK2_GLADEMM_LIBRARY glademm true true)
521 message(FATAL_ERROR "Unknown GTK2 component ${_component}")
526 # Solve for the GTK2 version if we haven't already
528 if(NOT GTK2_FIND_VERSION AND GTK2_GTK_INCLUDE_DIR)
529 _GTK2_GET_VERSION(GTK2_MAJOR_VERSION
532 ${GTK2_GTK_INCLUDE_DIR}/gtk/gtkversion.h)
533 set(GTK2_VERSION ${GTK2_MAJOR_VERSION}.${GTK2_MINOR_VERSION}.${GTK2_PATCH_VERSION})
537 # Try to enforce components
540 set(_GTK2_did_we_find_everything true) # This gets set to GTK2_FOUND
542 include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
544 foreach(_GTK2_component ${GTK2_FIND_COMPONENTS})
545 string(TOUPPER ${_GTK2_component} _COMPONENT_UPPER)
547 if(_GTK2_component STREQUAL "gtk")
548 FIND_PACKAGE_HANDLE_STANDARD_ARGS(GTK2_${_COMPONENT_UPPER} "Some or all of the gtk libraries were not found."
552 GTK2_GLIB_INCLUDE_DIR
553 GTK2_GLIBCONFIG_INCLUDE_DIR
557 GTK2_GDKCONFIG_INCLUDE_DIR
560 elseif(_GTK2_component STREQUAL "gtkmm")
561 FIND_PACKAGE_HANDLE_STANDARD_ARGS(GTK2_${_COMPONENT_UPPER} "Some or all of the gtkmm libraries were not found."
563 GTK2_GTKMM_INCLUDE_DIR
564 GTK2_GTKMMCONFIG_INCLUDE_DIR
566 GTK2_GLIBMM_INCLUDE_DIR
567 GTK2_GLIBMMCONFIG_INCLUDE_DIR
570 GTK2_GDKMM_INCLUDE_DIR
571 GTK2_GDKMMCONFIG_INCLUDE_DIR
574 elseif(_GTK2_component STREQUAL "glade")
575 FIND_PACKAGE_HANDLE_STANDARD_ARGS(GTK2_${_COMPONENT_UPPER} "The glade library was not found."
577 GTK2_GLADE_INCLUDE_DIR
579 elseif(_GTK2_component STREQUAL "glademm")
580 FIND_PACKAGE_HANDLE_STANDARD_ARGS(GTK2_${_COMPONENT_UPPER} "The glademm library was not found."
582 GTK2_GLADEMM_INCLUDE_DIR
583 GTK2_GLADEMMCONFIG_INCLUDE_DIR
587 if(NOT GTK2_${_COMPONENT_UPPER}_FOUND)
588 set(_GTK2_did_we_find_everything false)
592 if(_GTK2_did_we_find_everything AND NOT GTK2_VERSION_CHECK_FAILED)
595 # Unset our variables.
596 set(GTK2_FOUND false)
598 set(GTK2_VERSION_MAJOR)
599 set(GTK2_VERSION_MINOR)
600 set(GTK2_VERSION_PATCH)
601 set(GTK2_INCLUDE_DIRS)
605 if(GTK2_INCLUDE_DIRS)
606 list(REMOVE_DUPLICATES GTK2_INCLUDE_DIRS)