Skip to content

Commit

Permalink
feat: update dependencies script
Browse files Browse the repository at this point in the history
  • Loading branch information
maxime1907 committed Oct 11, 2023
1 parent 3a573b0 commit 46a6b31
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions update_dep.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

set -e
set -x

PROJECT_PATH="$PWD"
JANSSON_VERSION="2.14"

TMP_DIR="/tmp"
TMP_DIR_JANSSON="$TMP_DIR/jansson"
rm -rf $TMP_DIR_JANSSON*
curl -Lo $TMP_DIR_JANSSON.tar.gz https://github.com/akheron/jansson/releases/download/v$JANSSON_VERSION/jansson-$JANSSON_VERSION.tar.gz
tar -xvf $TMP_DIR_JANSSON.tar.gz -C $TMP_DIR && mv $TMP_DIR/jansson-$JANSSON_VERSION $TMP_DIR_JANSSON
# git clone https://github.com/akheron/jansson.git --recursive -b v2.14 $TMP_DIR_JANSSON
cd $TMP_DIR_JANSSON
mkdir -p build && cd build
cmake ../ -DCMAKE_POSITION_INDEPENDENT_CODE=ON -Dprotobuf_BUILD_SHARED_LIBS=OFF -DCMAKE_CXX_STANDARD=14 -DCMAKE_INSTALL_PREFIX="$PWD/../"
make -j 8
make install
cd ..
rm include/jansson_config.h
rm -rf lib
cd $PROJECT_PATH
cp -R "$TMP_DIR_JANSSON"/* ./jansson

0 comments on commit 46a6b31

Please sign in to comment.