summaryrefslogtreecommitdiffstats
path: root/MESON_FUNCTIONS
blob: 94c618407fc1b39979363c95fcde673e38510d29 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

# special functions for projects shich use meson build system
PREFIX=${PREFIX:-/usr}
meson_build () {
  MESON_BUILD_TYPE="${MESON_BUILD_TYPE:-release}"
#  export LANG=$LC_ALL
  cd $SOURCE_DIRECTORY
# do not put / before PREFIX
  SCRIPT="meson --prefix ${INSTALL_ROOT}$PREFIX --buildtype ${MESON_BUILD_TYPE} \
 --default-library shared --libdir lib"
  for LL in $OPTS; do
    SCRIPT+=" -D$LL"
  done
  SCRIPT+=" .  builddir/"
  $SCRIPT &&
  ninja -j "$MAKE_NJOBS" -C builddir/
}

meson_install () {
  cd $SOURCE_DIRECTORY
  ninja -C builddir/ install
}

default_build() {
 meson_build
}

default_install() {
  meson_install
}