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