summaryrefslogblamecommitdiffstats
path: root/MESON_FUNCTIONS
blob: 7a346900cf54c87f8b872fb8dfc85dcaeac2ce3a (plain) (tree)
1
2
3
4
5
6
7
8
9
                                                             
                      
                

                                                 
                      

                                                                                 
                                       



















                            

# 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 -C builddir/
}

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

default_build() {
 meson_build
}

default_install() {
  meson_install
}