# stats available at
# https://ci.appveyor.com/project/strukturag/libheif
image: Visual Studio 2022
configuration: Release
cache: c:\tools\vcpkg\installed\

environment:
  matrix:
  - arch: x64
  - arch: arm64

install:
  - vcpkg install aom:%arch%-windows
  - vcpkg install dav1d:%arch%-windows
  - vcpkg install ffmpeg[avcodec]:%arch%-windows
  - vcpkg install libde265:%arch%-windows
  - vcpkg install libjpeg-turbo:%arch%-windows
  - vcpkg install libpng:%arch%-windows
  - vcpkg install tiff:%arch%-windows
  - ps: If (${env:arch} -eq "x64") { vcpkg install x265:${env:arch}-windows }
  - vcpkg install zlib:%arch%-windows
  - cd c:\tools\vcpkg
  - vcpkg integrate install
  - cd %APPVEYOR_BUILD_FOLDER%

before_build:
  - mkdir build
  - cd build
  - cmake .. -A %arch% -DCMAKE_TOOLCHAIN_FILE=c:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake -DWITH_DAV1D=ON -DWITH_AOM_DECODER=ON -DWITH_AOM_ENCODER=ON -DWITH_JPEG_DECODER=ON -DWITH_JPEG_ENCODER=ON -DWITH_UNCOMPRESSED_CODEC=ON -DWITH_HEADER_COMPRESSION=ON -DWITH_FFMPEG_DECODER=ON
  - dir

build:
  project: build\libheif.sln
  parallel: true
  verbosity: normal

artifacts:
  - path: build
  - path: build\**\Release\*.exe
  - path: build\**\Release\*.dll
