INNER CODE UNIT · JavaScript

getDefaultLibDir

justadudewhohacks/opencv4nodejs · install/install.js:20

function getDefaultLibDir() {
  log.info('install', 'OPENCV_LIB_DIR is not set, looking for default lib dir')
  if (opencvBuild.isWin()) {
    throw new Error('OPENCV_LIB_DIR has to be defined on windows when auto build is disabled')
  }
  return defaultLibDir
}

opencvBuild.applyEnvsFromPackageJson()

const libDir = opencvBuild.isAutoBuildDisabled()
  ? (resolvePath(process.env.OPENCV_LIB_DIR) || getDefaultLibDir())
  : resolvePath(opencvBuild.opencvLibDir)

log.info('install', 'using lib dir: ' + libDir)

if (!fs.existsSync(libDir)) {
  throw new Error('library dir does not exist: ' + libDir)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…