mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-05 12:38:09 -07:00
meson.eclass: add meson_feature function
This can be used to simplify controlling meson_options.txt entries of type 'feature'. Signed-off-by: Mart Raudsepp <leio@gentoo.org> Signed-off-by: Matt Turner <mattst88@gentoo.org>
This commit is contained in:
committed by
Matt Turner
parent
1237f2258d
commit
eeb4c7afa1
@@ -188,6 +188,19 @@ meson_use() {
|
||||
usex "$1" "-D${2-$1}=true" "-D${2-$1}=false"
|
||||
}
|
||||
|
||||
# @FUNCTION: meson_feature
|
||||
# @USAGE: <USE flag> [option name]
|
||||
# @DESCRIPTION:
|
||||
# Given a USE flag and meson project option, outputs a string like:
|
||||
#
|
||||
# -Doption=enabled
|
||||
# -Doption=disabled
|
||||
#
|
||||
# If the project option is unspecified, it defaults to the USE flag.
|
||||
meson_feature() {
|
||||
usex "$1" "-D${2-$1}=enabled" "-D${2-$1}=disabled"
|
||||
}
|
||||
|
||||
# @FUNCTION: meson_src_configure
|
||||
# @USAGE: [extra meson arguments]
|
||||
# @DESCRIPTION:
|
||||
|
||||
Reference in New Issue
Block a user