# -*- 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           github 1.0
PortGroup           cmake 1.1
PortGroup           boost 1.0

github.setup        microsoft cpprestsdk 2.10.19 v
github.tarball_from archive
revision            0
categories          www devel
license             MIT
maintainers         {outlook.com:mohd.akram @mohd-akram} openmaintainer

description         C++ REST library for client-server communication

long_description    The C++ REST SDK is a Microsoft project for cloud-based \
                    client-server communication in native code using a modern \
                    asynchronous C++ API design.

checksums           rmd160  7b357c14b023e4f7be24660e5a024c545164aa16 \
                    sha256  4b0d14e5bfe77ce419affd253366e861968ae6ef2c35ae293727c1415bd145c8 \
                    size    1749647

depends_lib-append  port:libiconv \
                    path:lib/libssl.dylib:openssl \
                    port:websocketpp

compiler.cxx_standard  2011

configure.args-append -DBUILD_SAMPLES=OFF -DBUILD_TESTS=OFF \
    -DOPENSSL_ROOT_DIR=${prefix} -DWERROR=OFF

variant tests description {build tests.} {
    configure.args-replace      -DBUILD_TESTS=OFF -DBUILD_TESTS=ON
    configure.post_args-append  -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=OFF
    test.run                    yes
}
