Skip to content

Commit

Permalink
manage the dist directory more carefully
Browse files Browse the repository at this point in the history
  • Loading branch information
p2r3 committed Oct 14, 2024
1 parent ac25195 commit b48f6da
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions autobuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ rm -rf build
mkdir build

# Create a directory for the distributable files.
rm -rf dist
mkdir dist
mkdir dist/linux
mkdir dist/win32

cd build

if [ "$target_both" == true ]; then

rm -rf ../dist/linux; mkdir ../dist/linux
rm -rf ../dist/win32; mkdir ../dist/win32

# Build for both platforms back to back.
sed -i "s|^#define TARGET_WINDOWS|// #define TARGET_WINDOWS|" ../globals.h
cmake ..
Expand All @@ -65,8 +65,10 @@ else

# Build for the specified platform using CMake.
if [ "$target_windows" == true ]; then
rm -rf ../dist/win32; mkdir ../dist/win32
cmake -DCMAKE_TOOLCHAIN_FILE="../windows.cmake" ..
else
rm -rf ../dist/linux; mkdir ../dist/linux
cmake ..
fi
make -j$(nproc)
Expand Down

0 comments on commit b48f6da

Please sign in to comment.