[nostalgia] Make vcpkg dir name specify platform

This commit is contained in:
Gary Talent 2020-08-14 03:04:46 -05:00
parent 88bbcc34e2
commit 4ec7f2a24e
2 changed files with 8 additions and 7 deletions

View File

@ -2,7 +2,7 @@ OS=$(shell uname | tr [:upper:] [:lower:])
HOST_ENV=${OS}-$(shell uname -m)
DEVENV=devenv$(shell pwd | sed 's/\//-/g')
DEVENV_IMAGE=nostalgia-devenv
VCPKG_DIR=./.vcpkg/
VCPKG_DIR=./.vcpkg-${HOST_ENV}/
CURRENT_BUILD=$(file < .current_build)
ifneq ($(shell which docker 2> /dev/null),)
ifeq ($(shell docker inspect --format="{{.State.Status}}" ${DEVENV} 2>&1),running)
@ -95,24 +95,24 @@ vcpkg:
.PHONY: configure-release
configure-release:
${ENV_RUN} ${RM_RF} build/${HOST_ENV}-release
${ENV_RUN} ./scripts/setup-build ${HOST_ENV} release
${ENV_RUN} ./scripts/setup-build ${HOST_ENV} release ${VCPKG_DIR}
.PHONY: configure-debug
configure-debug:
${ENV_RUN} ${RM_RF} build/${HOST_ENV}-debug
${ENV_RUN} ./scripts/setup-build ${HOST_ENV} debug
${ENV_RUN} ./scripts/setup-build ${HOST_ENV} debug ${VCPKG_DIR}
.PHONY: configure-asan
configure-asan:
${ENV_RUN} ${RM_RF} build/${HOST_ENV}-asan
${ENV_RUN} ./scripts/setup-build ${HOST_ENV} asan
${ENV_RUN} ./scripts/setup-build ${HOST_ENV} asan ${VCPKG_DIR}
.PHONY: configure-gba
configure-gba:
${ENV_RUN} ${RM_RF} build/gba-release
${ENV_RUN} ./scripts/setup-build gba release
${ENV_RUN} ./scripts/setup-build gba release ${VCPKG_DIR}
.PHONY: configure-gba-debug
configure-gba-debug:
${ENV_RUN} ${RM_RF} build/gba-debug
${ENV_RUN} ./scripts/setup-build gba debug
${ENV_RUN} ./scripts/setup-build gba debug ${VCPKG_DIR}

View File

@ -4,6 +4,7 @@ set -e
target=$1
buildType=$2
vcpkg_dir=$3
project=$(pwd)/
@ -11,7 +12,7 @@ if [[ $target == gba ]]; then
toolchain="-DCMAKE_TOOLCHAIN_FILE=cmake/modules/GBA.cmake"
nostalgiaBuildType="GBA"
else
toolchain="-DCMAKE_TOOLCHAIN_FILE=.vcpkg/scripts/buildsystems/vcpkg.cmake"
toolchain="-DCMAKE_TOOLCHAIN_FILE=$vcpkg_dir/scripts/buildsystems/vcpkg.cmake"
nostalgiaBuildType="Native"
fi