# -*- 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.4 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  53e8ddc74d64acc1aaf5fb42d960dac6f49cd76b \
                    sha256  16cd37cdfecd5d8204cdbc37d0affbcadf970dbd33da8d8a0feba5028124f946 \
                    size    5905137

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
