修复Windows下的编译问题

This commit is contained in:
2025-03-10 14:45:15 +08:00
parent bd90f2f6f6
commit e831b8e862
4 changed files with 4 additions and 4 deletions

View File

@ -134,7 +134,7 @@ void InstallOpenCVAPI(Env env, Object exports)
CVMat::Init(env, exports); CVMat::Init(env, exports);
} }
#if defined(USE_OPENCV) && not defined(BUILD_MAIN_WORD) #if defined(USE_OPENCV) && !defined(BUILD_MAIN_WORD)
static Object Init(Env env, Object exports) static Object Init(Env env, Object exports)
{ {
InstallOpenCVAPI(env, exports); InstallOpenCVAPI(env, exports);

View File

@ -223,7 +223,7 @@ void InstallMNNAPI(Napi::Env env, Napi::Object exports)
} }
#if defined(USE_MNN) && not defined(BUILD_MAIN_WORD) #if defined(USE_MNN) && !defined(BUILD_MAIN_WORD)
static Object Init(Env env, Object exports) static Object Init(Env env, Object exports)
{ {
InstallMNNAPI(env, exports); InstallMNNAPI(env, exports);

View File

@ -305,7 +305,7 @@ void InstallOrtAPI(Napi::Env env, Napi::Object exports)
OrtSession::Init(env, exports); OrtSession::Init(env, exports);
} }
#if defined(USE_ONNXRUNTIME) && not defined(BUILD_MAIN_WORD) #if defined(USE_ONNXRUNTIME) && !defined(BUILD_MAIN_WORD)
static Object Init(Env env, Object exports) static Object Init(Env env, Object exports)
{ {
InstallOrtAPI(env, exports); InstallOrtAPI(env, exports);

View File

@ -151,7 +151,7 @@ async function main() {
"-DMNN_AVX512=ON", "-DMNN_AVX512=ON",
"-DMNN_BUILD_TOOLS=ON", "-DMNN_BUILD_TOOLS=ON",
"-DMNN_BUILD_CONVERTER=OFF", "-DMNN_BUILD_CONVERTER=OFF",
"-DMNN_WIN_RUNTIME_MT=OFF", "-DMNN_WIN_RUNTIME_MT=ON",
], (root) => [ ], (root) => [
`set(MNN_INCLUDE_DIR ${JSON.stringify(path.join(root, "include"))})`, `set(MNN_INCLUDE_DIR ${JSON.stringify(path.join(root, "include"))})`,
`set(MNN_LIB_DIR ${JSON.stringify(path.join(root, "lib"))})`, `set(MNN_LIB_DIR ${JSON.stringify(path.join(root, "lib"))})`,