From 7cdfc7ead41bbd58cfee8f35d67fe28d39046f69 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 11 Aug 2017 15:51:06 +0200 Subject: [PATCH] (MSVC 2017) We need to check if VsInstallRoot is empty instead of undefined --- Makefile.libretro | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Makefile.libretro b/Makefile.libretro index 069f0ce..322c13d 100644 --- a/Makefile.libretro +++ b/Makefile.libretro @@ -319,9 +319,15 @@ else ifeq ($(platform), windows_msvc2017_x64) VsInstallCommunity = $(ProgramFiles86)/Microsoft Visual Studio/2017/Community VsInstallRoot ?= $(shell if [ -d "$(VsInstallBuildTools)" ]; then echo "$(VsInstallBuildTools)"; fi) - VsInstallRoot ?= $(shell if [ -d "$(VsInstallEnterprise)" ]; then echo "$(VsInstallEnterprise)"; fi) - VsInstallRoot ?= $(shell if [ -d "$(VsInstallProfessional)" ]; then echo "$(VsInstallProfessional)"; fi) - VsInstallRoot ?= $(shell if [ -d "$(VsInstallCommunity)" ]; then echo "$(VsInstallCommunity)"; fi) + ifeq ($(VsInstallRoot), ) + VsInstallRoot = $(shell if [ -d "$(VsInstallEnterprise)" ]; then echo "$(VsInstallEnterprise)"; fi) + endif + ifeq ($(VsInstallRoot), ) + VsInstallRoot = $(shell if [ -d "$(VsInstallProfessional)" ]; then echo "$(VsInstallProfessional)"; fi) + endif + ifeq ($(VsInstallRoot), ) + VsInstallRoot = $(shell if [ -d "$(VsInstallCommunity)" ]; then echo "$(VsInstallCommunity)"; fi) + endif VsInstallRoot := $(VsInstallRoot) VcCompilerToolsVer := $(shell cat "$(VsInstallRoot)/VC/Auxiliary/Build/Microsoft.VCToolsVersion.default.txt" | grep -o '[0-9\.]*')