Files
Web_FreeCAD_Bitbybit/scripts/build-freecad-native.mjs

11 lines
553 B
JavaScript

import { execFileSync } from 'node:child_process'
import { resolve } from 'node:path'
const root = resolve(new URL('..', import.meta.url).pathname)
const build = resolve(root, '.cache/freecad/build-native')
const install = resolve(root, '.cache/freecad/install-native')
const jobs = process.env.FREECAD_BUILD_JOBS || '4'
execFileSync('cmake', ['--build', build, '--parallel', jobs], { cwd: root, stdio: 'inherit' })
execFileSync('cmake', ['--install', build], { cwd: root, stdio: 'inherit' })
console.log(`FreeCAD native oracle installed: ${install}`)