#!/bin/bash sqlitecpp="SQLiteCpp-2.2.0" root=`realpath ../..` work=$root/work src=$root/src target=$root/linux if [ -d "$work" ]; then rm -Rf $work; fi mkdir $work rm -f $target/lib/Debug/libSQLiteCpp.* rm -f $target/lib/Release/libSQLiteCpp.* rm -rf $target/include/SQLiteCpp unzip -q $src/SQLiteCpp/$sqlitecpp -d $work cp -R $work/$sqlitecpp/include/SQLiteCpp $target/include/ # debug build cd $work/$sqlitecpp mkdir build_debug cd build_debug cmake -DCMAKE_BUILD_TYPE=Debug -DSQLITECPP_USE_GCOV=OFF -DSQLITECPP_BUILD_EXAMPLES=OFF -DSQLITECPP_BUILD_TESTS=OFF .. make -j $(nproc) cp libSQLiteCpp.a $target/lib/Debug # release build cd $work/$sqlitecpp mkdir build_release cd build_release cmake -DCMAKE_BUILD_TYPE=Release -DSQLITECPP_USE_GCOV=OFF -DSQLITECPP_BUILD_EXAMPLES=OFF -DSQLITECPP_BUILD_TESTS=OFF .. make -j $(nproc) cp libSQLiteCpp.a $target/lib/Release rm -Rf $work