1*4882a593Smuzhiyun# gi-docgen is a new gnome documentation generator, which 2*4882a593Smuzhiyun# seems to be a successor to gtk-doc: 3*4882a593Smuzhiyun# https://gitlab.gnome.org/GNOME/gi-docgen 4*4882a593Smuzhiyun 5*4882a593Smuzhiyun# This variable is set to True if api-documentation is in 6*4882a593Smuzhiyun# DISTRO_FEATURES, and False otherwise. 7*4882a593SmuzhiyunGIDOCGEN_ENABLED ?= "${@bb.utils.contains('DISTRO_FEATURES', 'api-documentation', 'True', 'False', d)}" 8*4882a593Smuzhiyun# When building native recipes, disable gi-docgen, as it is not necessary, 9*4882a593Smuzhiyun# pulls in additional dependencies, and makes build times longer 10*4882a593SmuzhiyunGIDOCGEN_ENABLED:class-native = "False" 11*4882a593SmuzhiyunGIDOCGEN_ENABLED:class-nativesdk = "False" 12*4882a593Smuzhiyun 13*4882a593Smuzhiyun# meson: default option name to enable/disable gi-docgen. This matches most 14*4882a593Smuzhiyun# projects' configuration. In doubts - check meson_options.txt in project's 15*4882a593Smuzhiyun# source path. 16*4882a593SmuzhiyunGIDOCGEN_MESON_OPTION ?= 'gtk_doc' 17*4882a593SmuzhiyunGIDOCGEN_MESON_ENABLE_FLAG ?= 'true' 18*4882a593SmuzhiyunGIDOCGEN_MESON_DISABLE_FLAG ?= 'false' 19*4882a593Smuzhiyun 20*4882a593Smuzhiyun# Auto enable/disable based on GIDOCGEN_ENABLED 21*4882a593SmuzhiyunEXTRA_OEMESON:prepend = "-D${GIDOCGEN_MESON_OPTION}=${@bb.utils.contains('GIDOCGEN_ENABLED', 'True', '${GIDOCGEN_MESON_ENABLE_FLAG}', '${GIDOCGEN_MESON_DISABLE_FLAG}', d)} " 22*4882a593Smuzhiyun 23*4882a593SmuzhiyunDEPENDS:append = "${@' gi-docgen-native gi-docgen' if d.getVar('GIDOCGEN_ENABLED') == 'True' else ''}" 24*4882a593Smuzhiyun 25