aboutsummaryrefslogtreecommitdiff
path: root/cmake/FindGIO.cmake
blob: d65749dd8000ce95a29c9f1c19f5554e30831354 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
include(PkgConfigWithFallback)
find_pkg_config_with_fallback(GIO
    PKG_CONFIG_NAME gio-2.0
    LIB_NAMES gio-2.0
    INCLUDE_NAMES gio/gio.h
    INCLUDE_DIR_SUFFIXES glib-2.0 glib-2.0/include
    DEPENDS GObject
)

if(GIO_FOUND AND NOT GIO_VERSION)
    find_package(GLib)
    set(GIO_VERSION ${GLib_VERSION})
endif()

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GIO
    FOUND_VAR GIO_FOUND
    REQUIRED_VARS GIO_LIBRARY
    VERSION_VAR GIO_VERSION
)