language: c++

addons:
    apt:
        sources:
            - ubuntu-toolchain-r-test
        packages:
            - g++-6
            - gcc-6
            - ninja-build
            - libphysfs-dev
            - libsquish-dev
            - libglm-dev

git:
  submodules: false

script:
  - if [ "$CXX" = "g++" ]; then export CXX="g++-6" CC="gcc-6"; fi
  - git submodule update --init --recursive
  - mkdir -p build
  - cd build
  - cmake -GNinja -DZENLIB_BUILD_EXAMPLES=On -DZENLIB_BUILD_TESTS=On ..
  - ninja
  - cd ../tests
  - ../build/tests/test_vdfs

language: c++

addons:
    apt:
        sources:
            - ubuntu-toolchain-r-test
        packages:
            - g++-6
            - gcc-6
            - ninja-build

git:
  submodules: false

script:
  - if [ "$CXX" = "g++" ]; then export CXX="g++-6" CC="gcc-6"; fi
  # Use VCPKG because old Ubuntu versions don't have all the needed
  #  packages
  - git clone https://github.com/Microsoft/vcpkg || true
  - cd vcpkg
  - git fetch
  - git pull
  - ./bootstrap-vcpkg.sh
  - ./vcpkg install libsquish physfs glm
  - mkdir -p build
  - cd build
  - cmake -DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake -GNinja -DZENLIB_BUILD_EXAMPLES=On -DZENLIB_BUILD_TESTS=On ..
  - ninja
  - cd ../tests
  - ../build/tests/test_vdfs

cache:
  directories:
    - $HOME/vcpkg/installed
Use vcpkg for dependencies that are not available
Use vcpkg for dependencies that are not available
