Callback: work at any arity
[xonotic/netradiant.git] / cmake / FindGtkGLExt.cmake
1 find_package(PkgConfig)
2 if (PKG_CONFIG_FOUND)
3     if (GtkGLExt_FIND_REQUIRED)
4         set(_pkgconfig_REQUIRED REQUIRED)
5     endif ()
6     if (XWINDOWS)
7         pkg_check_modules(GtkGLExt ${_pkgconfig_REQUIRED} gtkglext-x11-1.0)
8     elseif (WIN32)
9         pkg_check_modules(GtkGLExt ${_pkgconfig_REQUIRED} gtkglext-win32-1.0)
10     else ()
11         pkg_check_modules(GtkGLExt ${_pkgconfig_REQUIRED} gtkglext-quartz-1.0)
12     endif ()
13 else ()
14     find_path(GtkGLExt_INCLUDE_DIRS gtkglwidget.h)
15     # find_library(GtkGLExt_LIBRARIES)
16     if (GtkGLExt_INCLUDE_DIRS AND GtkGLExt_LIBRARIES)
17         set(GtkGLExt_FOUND 1)
18         if (NOT GtkGLExt_FIND_QUIETLY)
19             message(STATUS "Found GtkGLExt: ${GtkGLExt_LIBRARIES}")
20         endif ()
21     elseif (GtkGLExt_FIND_REQUIRED)
22         message(SEND_ERROR "Could not find GtkGLExt")
23     elseif (NOT GtkGLExt_FIND_QUIETLY)
24         message(STATUS "Could not find GtkGLExt")
25     endif ()
26 endif ()
27 mark_as_advanced(GtkGLExt_INCLUDE_DIRS GtkGLExt_LIBRARIES)