mirror of
https://github.com/rehlds/metamod-r.git
synced 2025-02-05 18:20:35 +03:00
Add support for VS2015/VS2017 in old gradle.
This commit is contained in:
parent
25c9ee1bd7
commit
95f636a4dd
19
getucrtinfo.bat
Normal file
19
getucrtinfo.bat
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
@echo off
|
||||||
|
|
||||||
|
if defined VS150COMNTOOLS (
|
||||||
|
if not exist "%VS150COMNTOOLS%vcvarsqueryregistry.bat" goto NoVS
|
||||||
|
call "%VS150COMNTOOLS%vcvarsqueryregistry.bat"
|
||||||
|
goto :run
|
||||||
|
) else if defined VS140COMNTOOLS (
|
||||||
|
if not exist "%VS140COMNTOOLS%vcvarsqueryregistry.bat" goto NoVS
|
||||||
|
call "%VS140COMNTOOLS%vcvarsqueryregistry.bat"
|
||||||
|
goto :run
|
||||||
|
)
|
||||||
|
|
||||||
|
:NoVS
|
||||||
|
echo Error: Visual Studio 2015 or 2017 required.
|
||||||
|
exit /b 1
|
||||||
|
|
||||||
|
:run
|
||||||
|
echo %UniversalCRTSdkDir%
|
||||||
|
echo %UCRTVersion%
|
@ -121,5 +121,21 @@ rootProject.ext.createMsvcConfig = { boolean release, BinaryKind binKind ->
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Detect and setup UCRT paths
|
||||||
|
def ucrtInfo = "getucrtinfo.bat".execute().text
|
||||||
|
def m = ucrtInfo =~ /^(.*)\r\n(.*)?$/
|
||||||
|
if (!m.find()) {
|
||||||
|
return cfg
|
||||||
|
}
|
||||||
|
def kitPath = m.group(1)
|
||||||
|
def ucrtVersion = m.group(2)
|
||||||
|
def ucrtCheckFile = new File("${kitPath}Include/${ucrtVersion}/ucrt/stdio.h");
|
||||||
|
if (!ucrtCheckFile.exists()) {
|
||||||
|
return cfg
|
||||||
|
}
|
||||||
|
|
||||||
|
cfg.compilerOptions.args "/FS", "/I${kitPath}Include/${ucrtVersion}/ucrt";
|
||||||
|
cfg.linkerOptions.args("/LIBPATH:${kitPath}Lib/${ucrtVersion}/ucrt/x86");
|
||||||
|
|
||||||
return cfg
|
return cfg
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user