# -*- 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        recp cglm 0.9.7 v
github.tarball_from archive
revision            0

description         Highly Optimized Graphics Math (glm) for C

long_description    Highly optimized 2D|3D math library, also known as OpenGL \
                    Mathematics (glm) for `C`. cglm provides lot of utils to \
                    help math operations to be fast and quick to write.

checksums           rmd160  f738ab779ce69715d4e39016db88193f762654e4 \
                    sha256  cc0862eee2885d2a2b4870eb29b97c6e9b9ebc7c66e8854e1fa8f3d18d9d8475 \
                    size    720583

categories          devel math
license             MIT
maintainers         {gmail.com:herby.gillot @herbygillot} \
                    openmaintainer

compiler.c_standard 2011

configure.args-append   -DCGLM_USE_TEST=ON

pre-test {
    # Library not loaded: @rpath/libcglm.0.dylib
    system "install_name_tool -add_rpath ${cmake.build_dir} ${cmake.build_dir}/tests"
}

test.run            yes
test.cmd            ctest
test.target
