Add VS 2022 support
This commit is contained in:
parent
4cb20a50fa
commit
25bc144d18
|
@ -18,27 +18,46 @@ get_msvc_bin_path() {
|
||||||
_path=""
|
_path=""
|
||||||
_x64_toolset=0
|
_x64_toolset=0
|
||||||
|
|
||||||
if [[ $VisualStudioVersion == "14.0" ]]; then
|
|
||||||
##########################################
|
|
||||||
# Visual Studio 2015
|
|
||||||
##########################################
|
|
||||||
_path="$VCINSTALLDIR"
|
|
||||||
|
|
||||||
if [[ $(env | grep "LIB=" | grep "x64") != "" ]]; then
|
|
||||||
printf "${BOLD}${YELLOW}[VS2015 X64]${NORMAL}\n"
|
##########################################
|
||||||
|
# Visual Studio 2022
|
||||||
|
##########################################
|
||||||
|
if [[ $VisualStudioVersion == "17.0" ]]; then
|
||||||
|
_path="$VCToolsInstallDir"
|
||||||
|
|
||||||
|
if [[ $VSCMD_ARG_HOST_ARCH == "x64" ]]; then
|
||||||
|
printf "${BOLD}${YELLOW}[VS2022 X64]${NORMAL}\n"
|
||||||
_x64_toolset=1
|
_x64_toolset=1
|
||||||
_path+="bin/amd64"
|
_path+="bin/Hostx64/x64"
|
||||||
elif [[ $(env | grep "LIB=" | grep "x86") != "" ]]; then
|
elif [[ $VSCMD_ARG_HOST_ARCH == "x86" ]]; then
|
||||||
printf "${BOLD}${YELLOW}[VS2015 X86]${NORMAL}\n"
|
printf "${BOLD}${YELLOW}[VS2022 X86]${NORMAL}\n"
|
||||||
_path+="bin/"
|
_path+="bin/Hostx86/x86"
|
||||||
else
|
else
|
||||||
error "Unable to determine if you're using an x86 or x64 MSVC toolset\n"
|
error "Unable to determine if you're using an x86 or x64 MSVC toolset\n"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
##########################################
|
||||||
|
# Visual Studio 2019
|
||||||
|
##########################################
|
||||||
|
elif [[ $VisualStudioVersion == "16.0" ]]; then
|
||||||
|
_path="$VCToolsInstallDir"
|
||||||
|
|
||||||
|
if [[ $VSCMD_ARG_HOST_ARCH == "x64" ]]; then
|
||||||
|
printf "${BOLD}${YELLOW}[VS2019 X64]${NORMAL}\n"
|
||||||
|
_x64_toolset=1
|
||||||
|
_path+="bin/Hostx64/x64"
|
||||||
|
elif [[ $VSCMD_ARG_HOST_ARCH == "x86" ]]; then
|
||||||
|
printf "${BOLD}${YELLOW}[VS2019 X86]${NORMAL}\n"
|
||||||
|
_path+="bin/Hostx86/x86"
|
||||||
|
else
|
||||||
|
error "Unable to determine if you're using an x86 or x64 MSVC toolset\n"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
##########################################
|
||||||
|
# Visual Studio 2017
|
||||||
|
##########################################
|
||||||
elif [[ $VisualStudioVersion == "15.0" ]]; then
|
elif [[ $VisualStudioVersion == "15.0" ]]; then
|
||||||
##########################################
|
|
||||||
# Visual Studio 2017
|
|
||||||
##########################################
|
|
||||||
_path="$VCToolsInstallDir"
|
_path="$VCToolsInstallDir"
|
||||||
|
|
||||||
if [[ $VSCMD_ARG_HOST_ARCH == "x64" ]]; then
|
if [[ $VSCMD_ARG_HOST_ARCH == "x64" ]]; then
|
||||||
|
@ -52,19 +71,19 @@ get_msvc_bin_path() {
|
||||||
error "Unable to determine if you're using an x86 or x64 MSVC toolset\n"
|
error "Unable to determine if you're using an x86 or x64 MSVC toolset\n"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
elif [[ $VisualStudioVersion == "16.0" ]]; then
|
##########################################
|
||||||
##########################################
|
# Visual Studio 2015
|
||||||
# Visual Studio 2019
|
##########################################
|
||||||
##########################################
|
elif [[ $VisualStudioVersion == "14.0" ]]; then
|
||||||
_path="$VCToolsInstallDir"
|
_path="$VCINSTALLDIR"
|
||||||
|
|
||||||
if [[ $VSCMD_ARG_HOST_ARCH == "x64" ]]; then
|
if [[ $(env | grep "LIB=" | grep "x64") != "" ]]; then
|
||||||
printf "${BOLD}${YELLOW}[VS2019 X64]${NORMAL}\n"
|
printf "${BOLD}${YELLOW}[VS2015 X64]${NORMAL}\n"
|
||||||
_x64_toolset=1
|
_x64_toolset=1
|
||||||
_path+="bin/Hostx64/x64"
|
_path+="bin/amd64"
|
||||||
elif [[ $VSCMD_ARG_HOST_ARCH == "x86" ]]; then
|
elif [[ $(env | grep "LIB=" | grep "x86") != "" ]]; then
|
||||||
printf "${BOLD}${YELLOW}[VS2019 X86]${NORMAL}\n"
|
printf "${BOLD}${YELLOW}[VS2015 X86]${NORMAL}\n"
|
||||||
_path+="bin/Hostx86/x86"
|
_path+="bin/"
|
||||||
else
|
else
|
||||||
error "Unable to determine if you're using an x86 or x64 MSVC toolset\n"
|
error "Unable to determine if you're using an x86 or x64 MSVC toolset\n"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Loading…
Reference in New Issue
Block a user