From fc44d8f4f0bd4988d52dce33ef95e00ea7a5a659 Mon Sep 17 00:00:00 2001 From: bnnm Date: Sun, 8 Aug 2021 13:31:11 +0200 Subject: [PATCH] build: read msvc-build.config.ps1 for local sdks --- .gitignore | 2 +- msvc-build.ps1 | 16 ++++++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 234f7659..dde46b3b 100644 --- a/.gitignore +++ b/.gitignore @@ -45,7 +45,7 @@ Release /xmplay/*.dll /dependencies /version.h -/version.mk +/msvc-build.config.ps1 /**/vgmstream-win.zip /**/foo_input_vgmstream.fb2k-component diff --git a/msvc-build.ps1 b/msvc-build.ps1 index 8cd58d1d..c11c368c 100644 --- a/msvc-build.ps1 +++ b/msvc-build.ps1 @@ -8,13 +8,17 @@ Param( ############################################################################### # CONFIG # set these vars to override project defaults +# can also create a mssvc-build.config.ps1 with those ############################################################################### -# - values: "" (p), "v140" (MSVC 2015), "v141" (MSVC 2017), "v141_xp" (XP support), "v142" (MSVC 2019), etc -$toolset = "" -# - values: "" (default), "7.0" (Win7 SDK), "8.1" (Win8 SDK), "10.0" (Win10 SDK), etc -$sdk = "" -# - values: "" (default), "Win32" -$platform = "" +$config_file = ".\msvc-build.config.ps1" +if((Test-Path $config_file)) { . $config_file } + +# - toolsets: "" (default), "v140" (MSVC 2015), "v141" (MSVC 2017), "v141_xp" (XP support), "v142" (MSVC 2019), etc +if (!$toolset) { $toolset = "" } +# - sdks: "" (default), "7.0" (Win7 SDK), "8.1" (Win8 SDK), "10.0" (Win10 SDK), etc +if (!$sdk) { $sdk = "" } +# - platforms: "" (default), "Win32" +if (!$platform) { $platform = "" } ############################################################################### $solution = "vgmstream_full.sln"