code_device/twain/dsm/build.sh

38 lines
762 B
Bash
Executable File

# Main and minor version definition
# usage: ./build.sh os cpu ---> ./build.sh uos x86_64
@echo off
# clear
if [ -f ../../build/twaindsm/Makefile ]; then
echo ""
else
mkdir ../../../build
mkdir ../../../build/twaindsm
fi
origin_dir=$(pwd)
cd ../../../build/twaindsm
echo building path is $(pwd)
rm -rf ./*
cmake $origin_dir
make -j4
if [ $? -ne 0 ];then
err=1
echo "--------------------------------------make fail---------------------------------------"
# commented, we should restore the CMakeLists.txts...
else
err=0
echo "--------------------------------------make succeed------------------------------------"
cp ./libtwaindsm.so.2.5.0 ../../release/$1/$2/libtwaindsm.so
fi
cd $origin_dir
exit $err