mirror of
https://git.sr.ht/~thestr4ng3r/chiaki
synced 2025-08-21 05:53:12 -07:00
Add Nintendo Switch chiaki-lib support (#233)
This commit is contained in:
parent
6d02714d0e
commit
f35311bf61
19 changed files with 771 additions and 20 deletions
42
scripts/switch/build.sh
Executable file
42
scripts/switch/build.sh
Executable file
|
@ -0,0 +1,42 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -xveo pipefail
|
||||
|
||||
arg1=$1
|
||||
CHIAKI_ENABLE_SWITCH_LINUX="ON"
|
||||
build="./build"
|
||||
if [ "$arg1" != "linux" ]; then
|
||||
CHIAKI_ENABLE_SWITCH_LINUX="OFF"
|
||||
source /opt/devkitpro/switchvars.sh
|
||||
toolchain=/opt/devkitpro/switch.cmake
|
||||
|
||||
export CC=${TOOL_PREFIX}gcc
|
||||
export CXX=${TOOL_PREFIX}g++
|
||||
build="./build_switch"
|
||||
fi
|
||||
|
||||
SCRIPTDIR=$(dirname "$0")
|
||||
BASEDIR=$(realpath "${SCRIPTDIR}/../../")
|
||||
|
||||
build_chiaki (){
|
||||
pushd "${BASEDIR}"
|
||||
#rm -rf ./build
|
||||
|
||||
cmake -B "${build}" -DCMAKE_TOOLCHAIN_FILE=${toolchain} \
|
||||
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
|
||||
-DCHIAKI_ENABLE_TESTS=OFF \
|
||||
-DCHIAKI_ENABLE_CLI=OFF \
|
||||
-DCHIAKI_ENABLE_GUI=OFF \
|
||||
-DCHIAKI_ENABLE_ANDROID=OFF \
|
||||
-DCHIAKI_ENABLE_SWITCH=ON \
|
||||
-DCHIAKI_ENABLE_SWITCH_LINUX="${CHIAKI_ENABLE_SWITCH_LINUX}" \
|
||||
-DCHIAKI_LIB_ENABLE_MBEDTLS=ON
|
||||
|
||||
pushd "${BASEDIR}/${build}/switch/"
|
||||
make
|
||||
popd
|
||||
popd
|
||||
}
|
||||
|
||||
build_chiaki
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue