From 4ec7f2a24eb02c8652fec2d7e4831472867dc88e Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Fri, 14 Aug 2020 03:04:46 -0500 Subject: [PATCH] [nostalgia] Make vcpkg dir name specify platform --- Makefile | 12 ++++++------ scripts/setup-build | 3 ++- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 4affea0b..2808a253 100644 --- a/Makefile +++ b/Makefile @@ -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} diff --git a/scripts/setup-build b/scripts/setup-build index 9bc8156d..de6a8787 100755 --- a/scripts/setup-build +++ b/scripts/setup-build @@ -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