2020-08-05 03:53:02 +03:00
|
|
|
#!/bin/bash
|
|
|
|
|
2020-11-23 00:51:45 +02:00
|
|
|
mkdir -p "${BUILD_DIR}" || return 1
|
|
|
|
cd "${BUILD_DIR}" || return 1
|
2020-08-05 03:53:02 +03:00
|
|
|
|
|
|
|
cmake -Wno-dev \
|
2020-11-23 00:51:45 +02:00
|
|
|
-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" \
|
2021-12-29 01:25:06 +02:00
|
|
|
-DCMAKE_CXX_COMPILER="${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/${TOOLCHAIN}/bin/$CXX" \
|
2020-11-23 00:51:45 +02:00
|
|
|
-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_SYSTEM_PROCESSOR=$(get_cmake_system_processor) \
|
|
|
|
-DCMAKE_POSITION_INDEPENDENT_CODE=1 \
|
|
|
|
-DFFT_LIB=kissfft \
|
2021-12-29 01:25:06 +02:00
|
|
|
-DKISSFFT_SOURCE_DIR="${BASEDIR}"/src/"${LIB_NAME}"/src/3rdparty/kissfft \
|
|
|
|
-DBUILD_SHARED_LIBS=0 \
|
|
|
|
-DBUILD_TESTS=0 "${BASEDIR}"/src/"${LIB_NAME}" || return 1
|
2020-11-23 00:51:45 +02:00
|
|
|
|
|
|
|
make -j$(get_cpu_count) || return 1
|
|
|
|
|
|
|
|
make install || return 1
|
2020-08-05 03:53:02 +03:00
|
|
|
|
|
|
|
# CREATE PACKAGE CONFIG MANUALLY
|
2021-12-29 01:25:06 +02:00
|
|
|
create_chromaprint_package_config "1.5.1" || return 1
|