File: build-android-ndk

package info (click to toggle)
qpdf 12.3.2-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 72,660 kB
  • sloc: cpp: 59,054; perl: 12,189; ansic: 6,809; sh: 1,231; python: 1,041; xml: 43; makefile: 42
file content (41 lines) | stat: -rwxr-xr-x 1,230 bytes parent folder | download | duplicates (2)
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
#!/bin/bash
set -xeo pipefail
cd $(dirname $0)/..

# Build a static libqpdf for android with an ABI version <= 24. This
# is just to exercise that configuring for that platform works.

declare -a android_flags
android_flags=( \
      -DCMAKE_TOOLCHAIN_FILE="$ANDROID_NDK/build/cmake/android.toolchain.cmake" \
      -DANDROID_ABI=armeabi-v7a \
      -DANDROID_PLATFORM=android-21 \
)

rm -rf android-work build-android
mkdir android-work
pushd android-work
export WORK=$PWD
git clone https://github.com/libjpeg-turbo/libjpeg-turbo
cd libjpeg-turbo
cmake -S . -B build \
      "${android_flags[@]}" \
      -DCMAKE_INSTALL_PREFIX="$WORK" \
      -DENABLE_STATIC=ON \
      -DENABLE_SHARED=OFF \
      -DCMAKE_POSITION_INDEPENDENT_CODE=ON
make -C build -j$(nproc)
make -C build install
popd

export CMAKE_PREFIX_PATH=$WORK LDFLAGS="-L$WORK/lib"
cmake -S . -B build-android \
      "${android_flags[@]}" \
      -DCMAKE_BUILD_TYPE=RelWithDebinfo \
      -DUSE_IMPLICIT_CRYPTO=OFF \
      -DBUILD_SHARED_LIBS=OFF \
      -DBUILD_STATIC_LIBS=ON \
      -DREQUIRE_CRYPTO_NATIVE=ON

cmake --build build-android -t libqpdf --verbose -j$(nproc) -- -k
file build-android/libqpdf/CMakeFiles/libqpdf_object.dir/QUtil.cc.o | grep 'ARM, EABI5'