-
Notifications
You must be signed in to change notification settings - Fork 3
/
build_xerces.sh
executable file
·46 lines (39 loc) · 949 Bytes
/
build_xerces.sh
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/usr/bin/env bash
set -o pipefail
set -o errexit
set -o nounset
echo build_xerces.sh ==========================================================
source setenv.sh
source make.sh
if [[ $api -lt 28 ]]
then
pushd iconv_source
./configure \
--prefix=$GNU_ICONV_ROOT \
--host=$target \
"CC=${android_cc}" \
"CXX=${android_cxx}" \
"LD=${android_ld}" \
CFLAGS="-fPIE -fPIC" \
LDFLAGS="-pie"
$make
mkdir -p $GNU_ICONV_ROOT
make install
popd
fi
extra_configure_opts=()
if [ ! -z "${force_cpp_std+x}" ]
then
extra_configure_opts+=("-DCMAKE_CXX_STANDARD=$force_cpp_std")
fi
pushd xerces_source
cmake \
"-DCMAKE_INSTALL_PREFIX=$XERCESCROOT" \
"-DCMAKE_TOOLCHAIN_FILE=$OPENDDS_ANDROID_NDK/build/cmake/android.toolchain.cmake" \
"-DANDROID_ABI=$abi" "-DANDROID_PLATFORM=android-$api" \
"-DANDROID_CPP_FEATURES=rtti exceptions" \
"${extra_configure_opts[@]}"
$make
mkdir -p $XERCESCROOT
make install
popd