~thestr4ng3r/chiaki

ref: aa3a3b8bbcfd1c45a0b10ec6d6d2aa4e3d8bb131 chiaki/scripts/switch/build.sh -rwxr-xr-x 809 bytes
aa3a3b8bFlorian Märkl Update Windows Dependencies in CI 4 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash

set -xveo pipefail

arg1=$1
build="./build"
if [ "$arg1" != "linux" ]; then
	# source /opt/devkitpro/switchvars.sh
	# toolchain="${DEVKITPRO}/switch.cmake"
	toolchain="cmake/switch.cmake"
	export PORTLIBS_PREFIX="$(${DEVKITPRO}/portlibs_prefix.sh switch)"
	build="./build_switch"
fi

SCRIPTDIR=$(dirname "$0")
BASEDIR=$(realpath "${SCRIPTDIR}/../../")

build_chiaki (){
	pushd "${BASEDIR}"
		#rm -rf ./build

		cmake -B "${build}" \
			-GNinja \
			-DCMAKE_TOOLCHAIN_FILE=${toolchain} \
			-DCHIAKI_ENABLE_TESTS=OFF \
			-DCHIAKI_ENABLE_CLI=OFF \
			-DCHIAKI_ENABLE_GUI=OFF \
			-DCHIAKI_ENABLE_ANDROID=OFF \
			-DCHIAKI_ENABLE_BOREALIS=ON \
			-DCHIAKI_LIB_ENABLE_MBEDTLS=ON \
			# -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
			# -DCMAKE_FIND_DEBUG_MODE=ON

		ninja -C "${build}"
	popd
}

build_chiaki