]> de.git.xonotic.org Git - xonotic/netradiant.git/blob - cmake/FindGtkGLExt.cmake
icons: redo the netradiant icon with 512×512 resolution
[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 (APPLE)
7         # libffi is provided by base system so brew does not take the risk to override it
8         # hence then need for an explicit look-up
9         set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:/usr/local/opt/libffi/lib/pkgconfig")
10         pkg_check_modules(GtkGLExt ${_pkgconfig_REQUIRED} gtkglext-1.0 gtkglext-quartz-1.0)
11     elseif (XWINDOWS)
12         pkg_check_modules(GtkGLExt ${_pkgconfig_REQUIRED} gtkglext-x11-1.0)
13     elseif (WIN32)
14         pkg_check_modules(GtkGLExt ${_pkgconfig_REQUIRED} gtkglext-win32-1.0)
15     endif ()
16 else ()
17     find_path(GtkGLExt_INCLUDE_DIRS gtkglwidget.h)
18     # find_library(GtkGLExt_LIBRARIES)
19     if (GtkGLExt_INCLUDE_DIRS AND GtkGLExt_LIBRARIES)
20         set(GtkGLExt_FOUND 1)
21         if (NOT GtkGLExt_FIND_QUIETLY)
22             message(STATUS "Found GtkGLExt: ${GtkGLExt_LIBRARIES}")
23         endif ()
24     elseif (GtkGLExt_FIND_REQUIRED)
25         message(SEND_ERROR "Could not find GtkGLExt")
26     elseif (NOT GtkGLExt_FIND_QUIETLY)
27         message(STATUS "Could not find GtkGLExt")
28     endif ()
29 endif ()
30 mark_as_advanced(GtkGLExt_INCLUDE_DIRS GtkGLExt_LIBRARIES)