mirror of
https://github.com/rehlds/rehlds.git
synced 2024-12-27 23:25:45 +03:00
Temporary add support for VS2015 in old gradle.
This commit is contained in:
parent
46bf6e7af1
commit
505e739921
4
getucrtinfo.bat
Normal file
4
getucrtinfo.bat
Normal file
@ -0,0 +1,4 @@
|
||||
@echo off
|
||||
call "%VS140COMNTOOLS%vcvarsqueryregistry.bat"
|
||||
echo %UniversalCRTSdkDir%
|
||||
echo %UCRTVersion%
|
@ -119,5 +119,22 @@ 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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user