37 lines
1.3 KiB
Bash
Executable File
37 lines
1.3 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
mkdir -p "${BUILD_DIR}" || return 1
|
|
cd "${BUILD_DIR}" || return 1
|
|
|
|
cmake -Wno-dev \
|
|
-DCMAKE_VERBOSE_MAKEFILE=0 \
|
|
-DCMAKE_C_FLAGS="${CFLAGS}" \
|
|
-DCMAKE_CXX_FLAGS="${CXXFLAGS}" \
|
|
-DCMAKE_EXE_LINKER_FLAGS="${LDFLAGS}" \
|
|
-DCMAKE_SYSROOT="${ANDROID_SYSROOT}" \
|
|
-DCMAKE_FIND_ROOT_PATH="${ANDROID_SYSROOT}" \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DCMAKE_INSTALL_PREFIX="${LIB_INSTALL_PREFIX}" \
|
|
-DCMAKE_SYSTEM_NAME=Generic \
|
|
-DCMAKE_C_COMPILER="${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/${TOOLCHAIN}/bin/$CC" \
|
|
-DCMAKE_CXX_COMPILER="${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/${TOOLCHAIN}/bin/$CXX" \
|
|
-DCMAKE_LINKER="${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/${TOOLCHAIN}/bin/$LD" \
|
|
-DCMAKE_AR="${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/${TOOLCHAIN}/bin/$AR" \
|
|
-DCMAKE_AS="${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/${TOOLCHAIN}/bin/$AS" \
|
|
-DCMAKE_POSITION_INDEPENDENT_CODE=1 \
|
|
-DENABLE_STATIC=1 \
|
|
-DENABLE_SHARED=0 \
|
|
-DWITH_JPEG8=1 \
|
|
-DWITH_SIMD=1 \
|
|
-DWITH_TURBOJPEG=0 \
|
|
-DWITH_JAVA=0 \
|
|
-DCMAKE_SYSTEM_PROCESSOR=$(get_cmake_system_processor) \
|
|
"${BASEDIR}"/src/"${LIB_NAME}" || return 1
|
|
|
|
make -j$(get_cpu_count) || return 1
|
|
|
|
make install || return 1
|
|
|
|
# MANUALLY COPY PKG-CONFIG FILES
|
|
cp "${BUILD_DIR}"/pkgscripts/libjpeg.pc "${INSTALL_PKG_CONFIG_DIR}" || return 1
|