2020-01-24 11:18:18 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
2024-02-24 15:55:19 +00:00
|
|
|
INSTALL_PREFIX="$1"
|
|
|
|
EXTRA_CMAKE_OPTS="$2"
|
2020-01-24 11:18:18 +00:00
|
|
|
|
|
|
|
SCRIPTPATH=$(realpath "$(dirname "${BASH_SOURCE[0]}")")
|
|
|
|
|
|
|
|
cd "$SCRIPTPATH/.."
|
|
|
|
|
2024-02-13 14:54:02 +00:00
|
|
|
if [ ! -d jsdec ]; then
|
2024-02-24 15:55:19 +00:00
|
|
|
git clone https://github.com/rizinorg/jsdec.git --depth 1 --branch "dev"
|
2020-01-24 11:18:18 +00:00
|
|
|
fi
|
|
|
|
|
2021-01-16 10:48:31 +00:00
|
|
|
cd jsdec
|
2024-02-24 15:55:19 +00:00
|
|
|
if [ -d build_lib ]; then
|
|
|
|
rm -rf build_lib
|
2024-02-13 14:54:02 +00:00
|
|
|
fi
|
2024-02-24 15:55:19 +00:00
|
|
|
meson setup --buildtype=release --pkg-config-path="$INSTALL_PREFIX/lib/pkgconfig" -Dbuild_type=cutter build_lib
|
|
|
|
ninja -C build_lib
|
2020-01-24 11:18:18 +00:00
|
|
|
|
2024-11-24 05:00:28 +00:00
|
|
|
mkdir -p build_plugin && cd build_plugin
|
2024-02-24 15:55:19 +00:00
|
|
|
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DJSDEC_BUILD_DIR="../build_lib" -DCMAKE_INSTALL_PREFIX="$INSTALL_PREFIX" $EXTRA_CMAKE_OPTS ../cutter-plugin
|
|
|
|
ninja install
|