Skip to content

Commit

Permalink
meson.eclass: add meson_use function
Browse files Browse the repository at this point in the history
  • Loading branch information
floppym committed Dec 23, 2017
1 parent 4682eef commit b7ad7de
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions eclass/meson.eclass
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,19 @@ _meson_create_cross_file() {
EOF
}

# @FUNCTION: meson_use
# @USAGE: <USE flag> [option name]
# @DESCRIPTION:
# Given a USE flag and meson project option, outputs a string like:
#
# -Doption=true
# -Doption=false
#
# If the project option is unspecified, it defaults to the USE flag.
meson_use() {
usex "$1" "-D${2-$1}=true" "-D${2-$1}=false"
}

# @FUNCTION: meson_src_configure
# @DESCRIPTION:
# This is the meson_src_configure function.
Expand Down

0 comments on commit b7ad7de

Please sign in to comment.