Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ptitjano committed Apr 26, 2024
1 parent 2d839d4 commit 27bbcca
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions Dockerfile.windows
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM mcr.microsoft.com/windows/servercore:ltsc2022

SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference='SilentlyContinue'; $VerbosePreference = 'Continue';"]

RUN $env:starter_path = Get-Location
# RUN $env:starter_path = Get-Location

# download and install vs build tools needed by vcpkg
RUN Invoke-WebRequest "https://aka.ms/vs/17/release/vs_buildtools.exe" \
Expand All @@ -13,17 +13,24 @@ RUN Start-Process -FilePath "$env:TEMP\vs_buildtools.exe" \
"--includeRecommended" \
-Wait

# install git from choco
RUN iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')); \
choco install git -y --no-progress

# install vcpkg
# RUN $env:VCPKG_INSTALL_DIR="c:\\vcpkg"
# RUN $env:VCPKG_DEFAULT_TRIPLET="x64-windows"
RUN git clone https://github.com/microsoft/vcpkg c:\vcpkg && \
cd c:\vcpkg && \
bootstrap-vcpkg.bat -disableMetrics && \
.\vcpkg install cgal boost-program-options boost-timer boost-test --triplet x64-windows
RUN git clone https://github.com/microsoft/vcpkg c:\vcpkg; \
Start-Process -FilePath "c:\vcpkg\bootstrap-vcpkg.bat -ArgumentList "-disableMetrics" -Wait; \
c:\vcpkg\vcpkg install cgal boost-program-options boost-timer boost-test --triplet x64-windows

# build sfcgal
RUN cd $env:starter_path && \
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DSFCGAL_BUILD_TESTS=OFF -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALL_DIR\scripts\buildsystems\vcpkg.cmake"
# RUN cd $env:starter_path; \
# cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DSFCGAL_BUILD_TESTS=OFF -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALL_DIR\scripts\buildsystems\vcpkg.cmake"
RUN cmake -S . -B build \
-DCMAKE_BUILD_TYPE=Release \
-DSFCGAL_BUILD_TESTS=OFF \
-DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALL_DIR\scripts\buildsystems\vcpkg.cmake"

# Restore default shell for Windows containers.
SHELL ["cmd.exe", "/s", "/c"]
Expand Down

0 comments on commit 27bbcca

Please sign in to comment.