diff options
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/meson.eclass | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/eclass/meson.eclass b/eclass/meson.eclass index 4ba364924e40..5fab2f8df6be 100644 --- a/eclass/meson.eclass +++ b/eclass/meson.eclass @@ -64,6 +64,11 @@ fi # Build directory, location where all generated files should be placed. # If this isn't set, it defaults to ${WORKDIR}/${P}-build. +# @ECLASS-VARIABLE: EMESON_BUILDTYPE +# @DESCRIPTION: +# The buildtype value to pass to meson setup. +: ${EMESON_BUILDTYPE=plain} + # @ECLASS-VARIABLE: EMESON_SOURCE # @DEFAULT_UNSET # @DESCRIPTION: @@ -310,7 +315,6 @@ meson_src_configure() { local mesonargs=( meson setup - --buildtype plain --libdir "$(get_libdir)" --localstatedir "${EPREFIX}/var/lib" --prefix "${EPREFIX}/usr" @@ -321,6 +325,10 @@ meson_src_configure() { --native-file "$(_meson_create_native_file)" ) + if [[ -n ${EMESON_BUILDTYPE} ]]; then + mesonargs+=( --buildtype "${EMESON_BUILDTYPE}" ) + fi + if tc-is-cross-compiler; then mesonargs+=( --cross-file "$(_meson_create_cross_file)" ) fi |