mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-10-31 09:20:21 +00:00
Make windows-configure.sh runnable without root/build
For when you want to set up a windows build dir, without doing the build yet.
This commit is contained in:
parent
a02679b87a
commit
49b97f47cc
@ -2,12 +2,25 @@
|
||||
set -e
|
||||
set -x
|
||||
|
||||
root=$(readlink -f "$1")
|
||||
shift
|
||||
mkdir -p "$1"
|
||||
build=$(readlink -f "$1")
|
||||
shift
|
||||
cd "$build"
|
||||
# Usage: windows-configure.sh [rootdir [builddir]] -DWHATEVER=BLAH ...
|
||||
|
||||
if [ $# -ge 1 ] && [[ "$1" != -* ]]; then
|
||||
root="$1"
|
||||
shift
|
||||
else
|
||||
root="$(dirname $0)"/..
|
||||
fi
|
||||
root="$(readlink -f "$root")"
|
||||
|
||||
if [ $# -ge 1 ] && [[ "$1" != -* ]]; then
|
||||
build="$(readlink -f "$1")"
|
||||
shift
|
||||
else
|
||||
build="$root/build/win32"
|
||||
echo "Setting up build in $build"
|
||||
fi
|
||||
|
||||
mkdir -p "$build"
|
||||
cmake \
|
||||
-S "$root" -B "$build" \
|
||||
-G 'Unix Makefiles' \
|
||||
@ -31,4 +44,4 @@ cmake \
|
||||
-DFORCE_SPDLOG_SUBMODULE=ON \
|
||||
-DFORCE_NLOHMANN_SUBMODULE=ON \
|
||||
-DWITH_LTO=OFF \
|
||||
$@
|
||||
"$@"
|
||||
|
Loading…
Reference in New Issue
Block a user