fix: add git and pkg-config as the dependencies of vcpkg

This commit is contained in:
Amin Yahyaabadi 2022-01-19 15:34:06 -08:00
parent 4a419e6a17
commit 0634668674
3 changed files with 10 additions and 8 deletions

2
dist/setup_cpp.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -12,18 +12,20 @@ let hasVCPKG = false
// eslint-disable-next-line @typescript-eslint/no-unused-vars // eslint-disable-next-line @typescript-eslint/no-unused-vars
export async function setupVcpkg(_version: string, setupDir: string, _arch: string): Promise<InstallationInfo> { export async function setupVcpkg(_version: string, setupDir: string, _arch: string): Promise<InstallationInfo> {
if (!hasVCPKG || which.sync("vcpkg", { nothrow: true }) === null) { if (!hasVCPKG || which.sync("vcpkg", { nothrow: true }) === null) {
if (!existsSync(join(setupDir, addShellExtension("bootstrap-vcpkg")))) {
execa.sync("git", ["clone", "https://github.com/microsoft/vcpkg"], { cwd: dirname(setupDir) })
} else {
warning(`Vcpkg folder already exists at ${setupDir}`)
}
if (process.platform === "linux") { if (process.platform === "linux") {
// vcpkg download and extraction dependencies // vcpkg download and extraction dependencies
await setupAptPack("curl") await setupAptPack("curl")
await setupAptPack("zip") await setupAptPack("zip")
await setupAptPack("unzip") await setupAptPack("unzip")
await setupAptPack("tar") await setupAptPack("tar")
await setupAptPack("git")
await setupAptPack("pkg-config")
}
if (!existsSync(join(setupDir, addShellExtension("bootstrap-vcpkg")))) {
execa.sync("git", ["clone", "https://github.com/microsoft/vcpkg"], { cwd: dirname(setupDir) })
} else {
warning(`Vcpkg folder already exists at ${setupDir}`)
} }
execa.sync(addShellExtension(addShellHere("bootstrap-vcpkg")), { cwd: setupDir, shell: true }) execa.sync(addShellExtension(addShellHere("bootstrap-vcpkg")), { cwd: setupDir, shell: true })