修复Windows编译问题
This commit is contained in:
@ -104,6 +104,10 @@ async function downloadFromURL(name, url, resolver) {
|
||||
fs.rmSync(outputDir, { force: true, recursive: true });
|
||||
|
||||
if (!checkFile(saveName)) {
|
||||
console.log(`开始下载${name}, 地址:${url}`);
|
||||
await fetch(url).then(res => {
|
||||
console.log(res.status)
|
||||
})
|
||||
const result = spawnSync("curl", ["-o", saveName + ".cache", "-L", url, "-s", "-w", "%{http_code}"], { ...spawnOption, stdio: "pipe" });
|
||||
assert(result.status == 0 && result.stdout.toString() == "200", `下载${name}失败`);
|
||||
fs.renameSync(saveName + ".cache", saveName);
|
||||
@ -154,7 +158,7 @@ async function main() {
|
||||
`set(MNN_LIBS MNN)`,
|
||||
].join("\n"));
|
||||
//OpenCV
|
||||
if (buildOptions.withOpenCV) cmakeBuildFromSource("OpenCV", "https://github.com/opencv/opencv.git", null, "4.11.0", [
|
||||
if (buildOptions.withOpenCV) cmakeBuildFromSource("OpenCV", "https://github.com/opencv/opencv.git", "4.11.0", null, [
|
||||
"-DBUILD_SHARED_LIBS=OFF",
|
||||
"-DBUILD_opencv_apps=OFF",
|
||||
"-DBUILD_opencv_js=OFF",
|
||||
|
Reference in New Issue
Block a user