Skip to content

Commit

Permalink
pass build dir as cmake argument rather than using cd
Browse files Browse the repository at this point in the history
  • Loading branch information
slowriot committed Jan 9, 2025
1 parent 31e5af8 commit 9776ddf
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ if [ "$compiled_resources_updated" != 0 ]; then
fi
fi

cd "$build_dir"

ccache="$(which ccache)"
if [ -n "$ccache" ]; then
echo "CCache enabled"
Expand All @@ -64,14 +62,13 @@ fi

if [ ! -f "Makefile" ] || [ "../CMakeLists.txt" -nt "Makefile" ]; then
echo "Running CMAKE to generate Makefile..."
emcmake cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1 .. || exit 1
emcmake cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -B "$build_dir" || exit 1
fi

echo "Running make..."
#emmake make -j"$procs" VERBOSE=1 "$target" || exit 1
emmake make -j"$procs" "$target" || exit 1
#emmake cmake --build "$build_dir" -j"$procs" VERBOSE=1 -t "$target" || exit 1
emmake cmake --build "$build_dir" -j"$procs" -t "$target" || exit 1

echo "Assembling resources..."
cd ..
rsync -ar --progress "resources/"* "$build_dir/"
echo "Done."

0 comments on commit 9776ddf

Please sign in to comment.