-
Notifications
You must be signed in to change notification settings - Fork 0
/
wx-build-arch-cmake
executable file
·48 lines (37 loc) · 1.25 KB
/
wx-build-arch-cmake
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
47
48
#!/bin/bash
set -e
. init-env-arch $1
WX_BUILDDIR_ARCH=${WX_ROOT}/build_${CONF_ANDROID_ARCH}
WX_LIB_DIR=${WX_BUILDDIR_ARCH}/lib
pushd wxWidgets
mkdir -p build_${CONF_ANDROID_ARCH}
pushd build_${CONF_ANDROID_ARCH}
export CPPFLAGS=""
export CXXFLAGS="${CPPFLAGS}"
export CFLAGS="${CPPFLAGS}"
export LDFLAGS="-llog -Wl,-rpath-link=${CONF_SYSROOT_USR}/lib"
cmake --fresh \
-DCMAKE_TOOLCHAIN_FILE="${ANDROID_NDK_ROOT}/build/cmake/android.toolchain.cmake" \
-DCMAKE_INSTALL_PREFIX="${CONF_SYSROOT_USR}" \
-DANDROID_PLATFORM="${ANDROID_NDK_PLATFORM}" \
-DANDROID_ABI="${CONF_ANDROID_ARCH}" \
-DCMAKE_FIND_ROOT_PATH="${CONF_SYSROOT_ARCH};${QT5_CUSTOM_DIR}" \
-DCMAKE_FIND_DEBUG_MODE=ON \
-DCMAKE_EXE_LINKER_FLAGS="${LDFLAGS}" \
-DCMAKE_MODULE_LINKER_FLAGS="${LDFLAGS}" \
-DCMAKE_SHARED_LINKER_FLAGS="${LDFLAGS}" \
-DCMAKE_C_FLAGS="${CFLAGS}" \
-DCMAKE_CXX_FLAGS="${CXXFLAGS}" \
-DwxBUILD_TOOLKIT=qt \
-DwxUSE_SECRETSTORE=OFF \
-DwxUSE_LIBICONV=OFF \
-DwxUSE_INTL=ON \
-DwxUSE_OPENGL=OFF \
-DwxUSE_REGEX=OFF \
..
cmake --build . -j 24 --target install/strip
popd
cp ${WX_LIB_DIR}/*.so ${CONF_SYSROOT_USR}/lib/
cp -r ${WX_LIB_DIR}/wx ${CONF_SYSROOT_USR}/lib/
cp -r ./include/wx ${CONF_SYSROOT_USR}/include
popd