# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0
PortGroup           cmake   1.1
PortGroup           github  1.0

github.setup        syoyo tinygltf 2.9.7 v
revision            0
github.tarball_from archive

categories          graphics devel
license             MIT
maintainers         nomaintainer
description         Header only C++11 tiny glTF 2.0 library
long_description    {*}${description}.

checksums           rmd160  3240c9c7a97ed36c2c50b0dd4420ed2df33dc20d \
                    sha256  9d31cf7f22e81febaf1ad587d7722582c154f7d9125673ee46c0c594765e8f35 \
                    size    5904913

compiler.cxx_standard          2011
compiler.thread_local_storage  yes

patchfiles          01_patch-cmake.diff \
                    02_patch-third-party-includes.diff \
                    03_patch-enable-ctest.diff

depends_lib-append  port:stb \
                    port:nlohmann-json

configure.args-append \
                    -DBUILD_SHARED_LIBS=ON \
                    -DTINYGLTF_BUILD_BUILDER_EXAMPLE=OFF \
                    -DTINYGLTF_BUILD_LOADER_EXAMPLE=OFF \
                    -DTINYGLTF_BUILD_GL_EXAMPLES=OFF \
                    -DTINYGLTF_BUILD_VALIDATOR_EXAMPLE=OFF \
                    -DTINYGLTF_VERSION="${github.version}" \
                    -DTINYGLTF_BUILD_TESTS=ON

test.run            yes
test.cmd            ctest
