File: install-colmap-windows.ps1

package info (click to toggle)
colmap 3.10-2.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,168 kB
  • sloc: cpp: 91,779; ansic: 17,774; python: 3,459; sh: 216; makefile: 154
file content (39 lines) | stat: -rwxr-xr-x 1,117 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
$CURRDIR = $PWD

$COMPILER_TOOLS_DIR = "${env:COMPILER_CACHE_DIR}/bin"
New-Item -ItemType Directory -Force -Path ${COMPILER_TOOLS_DIR}
$env:Path = "${COMPILER_TOOLS_DIR};" + $env:Path

If (!(Test-Path -path "${COMPILER_TOOLS_DIR}/ccache.exe" -PathType Leaf)) {
    .github/workflows/install-ccache.ps1 -Destination "${COMPILER_TOOLS_DIR}"
}

# Setup vcpkg
cd ${CURRDIR}
git clone https://github.com/microsoft/vcpkg ${env:VCPKG_INSTALLATION_ROOT}
cd ${env:VCPKG_INSTALLATION_ROOT}
git checkout "${env:VCPKG_COMMIT_ID}"
./bootstrap-vcpkg.bat

cd ${CURRDIR}
& "./scripts/shell/enter_vs_dev_shell.ps1"
& "${env:VCPKG_INSTALLATION_ROOT}/vcpkg.exe" integrate install

# Build COLMAP
mkdir build
cd build
cmake .. `
    -GNinja `
    -DCMAKE_MAKE_PROGRAM=ninja `
    -DCUDA_ENABLED="OFF" `
    -DGUI_ENABLED="OFF" `
    -DCGAL_ENABLED="OFF" `
    -DLSD_ENABLED="OFF" `
    -DCMAKE_BUILD_TYPE="Release" `
    -DCMAKE_TOOLCHAIN_FILE="${env:CMAKE_TOOLCHAIN_FILE}" `
    -DVCPKG_TARGET_TRIPLET="${env:VCPKG_TARGET_TRIPLET}"
ninja install

ccache --show-stats --verbose
ccache --evict-older-than 1d
ccache --show-stats --verbose