xrbDS/tools/create_solution.sh
Daniel Ramírez b9ee14cc40 Create CMake solution
Some basic folder structure
2025-04-17 03:32:24 +02:00

28 lines
488 B
Bash

#!/bin/bash
DIR="../build"
if [ ! -d $DIR ]; then
mkdir $DIR
fi
if [ ! -d $DIR ]; then
echo "Failed to create build directory"
exit 3
fi
if [ ! -d $DEVKITPRO ]; then
echo "Please set DEVKITPRO environment variable"
exit 2
fi
working_dir_name="$(basename "$PWD")"
if [ "$working_dir_name" = "tools" ]; then
echo "Creating solution..."
else
echo "Please run this script from the tools directory"
exit 1
fi
$DEVKITPRO/portlibs/nds/bin/arm-none-eabi-cmake -S .. -B $DIR