2020
2121set -e
2222
23- THIS_DIR=$( DIRNAME=$( dirname " $0 " ) ; cd " $DIRNAME " ; pwd)
24- cd " $THIS_DIR "
25-
26- echo " === [$0 ] check env begin==="
27- env_assert " MR_ARCH"
28- env_assert " MR_BUILD_NAME"
29- env_assert " MR_CC"
30- env_assert " MR_BUILD_SOURCE"
31- env_assert " MR_BUILD_PREFIX"
32- env_assert " MR_SYS_ROOT"
33- env_assert " MR_HOST_NPROC"
34- echo " MR_DEBUG:$MR_DEBUG "
35- echo " ===check env end==="
36- # prepare build config
37- CFG_FLAGS=" --prefix=$MR_BUILD_PREFIX --default-library static -Ddocs=disabled -Dcairo=disabled -Dchafa=disabled -Dtests=disabled"
38-
39- if [[ " $MR_DEBUG " == " debug" ]]; then
40- CFG_FLAGS=" $CFG_FLAGS --buildtype=debug"
41- else
42- CFG_FLAGS=" $CFG_FLAGS --buildtype=release"
43- fi
23+ CFG_FLAGS=" -Ddocs=disabled -Dcairo=disabled -Dchafa=disabled -Dtests=disabled"
4424
4525echo " ----------------------"
4626echo " [*] check freetype"
5535 CFG_FLAGS=" $CFG_FLAGS -Dfreetype=disabled"
5636fi
5737
58- cd $MR_BUILD_SOURCE
59- export CC=" $MR_CC "
60- export CXX=" $MR_CXX "
61-
62- if [[ $( uname -m) != " $MR_ARCH " || " $MR_FORCE_CROSS " ]]; then
63- if [[ $MR_IS_SIMULATOR != 1 ]]; then
64- echo " [*] cross compile, on $( uname -m) compile $MR_PLAT $MR_ARCH ."
65- CFG_FLAGS=" $CFG_FLAGS --cross-file $MR_SHELL_CONFIGS_DIR /meson-crossfiles/$MR_ARCH -$MR_PLAT .meson"
66- else
67- echo " [*] cross compile, on $( uname -m) compile $MR_PLAT $MR_ARCH simulator."
68- CFG_FLAGS=" $CFG_FLAGS --cross-file $MR_SHELL_CONFIGS_DIR /meson-crossfiles/$MR_ARCH -$MR_PLAT -simulator.meson"
69- fi
70- fi
71-
72- echo " ----------------------"
73- echo " [*] compile $LIB_NAME "
74- echo " CC: $MR_CC "
75- echo " CFG_FLAGS: $CFG_FLAGS "
76- echo " ----------------------"
77- echo
78-
79- build=./build-$MR_ARCH
80- if [[ -d $build ]]; then
81- rm -rf $build
82- fi
83-
84- # show all configure
85- # https://mesonbuild.com/Build-options.html
86- meson setup $build $CFG_FLAGS
87-
88- cd $build
89-
90- echo " compile"
91-
92- meson compile && meson install
38+ ./meson-compatible.sh " $CFG_FLAGS "
0 commit comments