platform:
  - x64

configuration: 
  - Release

cache: c:\tools\vcpkg\installed\


environment:
  matrix:
    - cmake_generator_vs_name: "Visual Studio 14"
      msvc_name: msvc-14.0
      BOOST_ROOT: C:\Libraries\boost_1_67_0
    - cmake_generator_vs_name: "Visual Studio 14 2015"
      msvc_name: msvc-15.0
      BOOST_ROOT: C:\Libraries\boost_1_67_0

branches:
  only:
    - master
  
# before everything
init:
  - cmd: cmake --version
  - cmd: msbuild /version

# clone directory
clone_folder: C:\projects\shark

# scripts to run before build
before_build:
  - cmd: cd c:\tools\vcpkg
  - cmd: vcpkg install zlib:x64-windows libjpeg-turbo:x64-windows libpng:x64-windows libzip:x64-windows
  - cmd: vcpkg integrate install
  - cmd: cd C:\projects\shark
  - cmd: md build
  - cmd: cd build
  - cmd: set CMAKE_GENERATOR_NAME=%cmake_generator_vs_name% Win64
  - cmd: set BOOST_LIBRARYDIR=%BOOST_ROOT%\lib64-%msvc_name%
  - cmd: echo %CMAKE_GENERATOR_NAME%
  - cmd: echo %BOOST_LIBRARYDIR%
  - cmd: cmake -DCMAKE_TOOLCHAIN_FILE=c:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake -G "%CMAKE_GENERATOR_NAME%" -DCMAKE_BUILD_TYPE=%configuration% -DBUILD_TESTING=ON -DBUILD_SHARED_LIBS=ON -DBOOST_ROOT="%BOOST_ROOT%" -DBOOST_LIBRARYDIR="%BOOST_LIBRARYDIR%" ..
  
# actual build process
build:
  project: C:\projects\shark\build\shark.sln 
  parallel: true 
  verbosity: minimal # compiler verbosity
