[q3map2] Unwind script stack in case of script loading error.
[xonotic/netradiant.git] / cmake / FindGTK2.cmake
1 find_package(PkgConfig)
2 if (PKG_CONFIG_FOUND)
3     if (GTK2_FIND_REQUIRED)
4         set(_pkgconfig_REQUIRED REQUIRED)
5     endif ()
6     pkg_check_modules(GTK2 ${_pkgconfig_REQUIRED} gtk+-2.0)
7 else ()
8     find_path(GTK2_INCLUDE_DIRS gtk.h)
9     # find_library(GTK2_LIBRARIES)
10     if (GTK2_INCLUDE_DIRS AND GTK2_LIBRARIES)
11         set(GTK2_FOUND 1)
12         if (NOT GTK2_FIND_QUIETLY)
13             message(STATUS "Found GTK2: ${GTK2_LIBRARIES}")
14         endif ()
15     elseif (GTK2_FIND_REQUIRED)
16         message(SEND_ERROR "Could not find GTK2")
17     elseif (NOT GTK2_FIND_QUIETLY)
18         message(STATUS "Could not find GTK2")
19     endif ()
20 endif ()
21 mark_as_advanced(GTK2_INCLUDE_DIRS GTK2_LIBRARIES)