LingYun open library local/cross compile shell scripts
guowenxue
yesterday 1ee652137c90cec0c3ff4ea34194cdf7d98202e6
lvgl/build.sh
@@ -30,6 +30,9 @@
# download taballs path
TARBALL_PATH=$PRJ_PATH/tarballs
# check installed or not file
INST_FILE=$PREFIX_PATH/bin/lvglsim
# shell script will exit once get command error
set -e
@@ -66,6 +69,11 @@
function do_fetch()
{
    if [ -e ${INST_FILE} ] ; then
        pr_warn "$LIB_NAME compiled already, exit..."
        exit;
    fi
    if [ -d $LIB_NAME/lvgl ] ; then
        pr_warn "$LIB_NAME source code fetched already"
        return 0;
@@ -115,7 +123,7 @@
    if [ ! -f "$BUILD_DIR/CMakeCache.txt" ]; then
        pr_info "configuring cmake..."
        cmake -B "$BUILD_DIR" -S . -DCMAKE_TOOLCHAIN_FILE=./user_cross_compile_setup.cmake
        cmake -B "$BUILD_DIR" -S . -DCMAKE_TOOLCHAIN_FILE=./user_cross_compile_setup.cmake -DCMAKE_INSTALL_PREFIX=${PREFIX_PATH}
    else
        pr_warn "cmake already configured"
    fi
@@ -123,6 +131,9 @@
    pr_info "building..."
    cmake --build "$BUILD_DIR" -j$(nproc)
    cmake --install build
    install -m 755 -D build/bin/lvglsim $PREFIX_PATH/bin/lvglsim
    cd "$PRJ_PATH" || exit 1
}
@@ -147,11 +158,6 @@
    exit;
fi
if [ -e $LIB_NAME/build/bin/lvglsim  ] ; then
    pr_warn "$LIB_NAME compiled already, exit..."
    exit;
fi
do_depends
do_fetch
@@ -161,3 +167,4 @@
do_patch
do_build