Files
ai-box/cxx/node.cc
2025-03-07 17:18:20 +08:00

28 lines
491 B
C++

#include "common/node.h"
#include "cv/node.h"
#include "mnn/node.h"
#include "ort/node.h"
using namespace Napi;
#if defined(BUILD_MAIN_WORD)
Object Init(Env env, Object exports)
{
// OpenCV
#ifdef USE_OPENCV
printf("use opencv\n");
InstallOpenCVAPI(env, exports);
#endif
// OnnxRuntime
#ifdef USE_ONNXRUNTIME
InstallOrtAPI(env, exports);
#endif
// MNN
#ifdef USE_MNN
InstallMNNAPI(env, exports);
#endif
return exports;
}
NODE_API_MODULE(addon, Init)
#endif