summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/libcereal/libcereal_1.3.2.bb
blob: fb37de3c30ee7b32ac5d747411a2e15d2d15c0db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
SUMMARY = "A C++11 library for serialization"
HOMEPAGE = "https://uscilab.github.io/cereal/"

SECTION = "libs"

LICENSE = "BSD-3-Clause & MIT & BSL-1.0"
LIC_FILES_CHKSUM = "\
    file://LICENSE;md5=4921372a1fb38469e667c38b17a1c4b3 \
    file://include/cereal/external/rapidxml/license.txt;md5=d63ab70ba21ca0544b03284958324301 \
    file://include/cereal/external/LICENSE;md5=b07578c9df99c0b8b45eb041efd4a645 \
    file://include/cereal/external/rapidjson/LICENSE;md5=e7abb663111d4ac17cf00323698aff08 \
    file://include/cereal/external/rapidjson/msinttypes/LICENSE;md5=dffce65b98c773976de2e338bd130f46 \
"

DEPENDS = " ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'boost', '', d)} "

PROVIDES += "${PN}-dev"

PV .= "+git${SRCPV}"
SRCREV = "ebef1e929807629befafbb2918ea1a08c7194554"
SRC_URI = "git://github.com/USCiLab/cereal.git;branch=master;protocol=https \
           file://run-ptest \
"

S = "${WORKDIR}/git"

inherit cmake pkgconfig ptest

LIBATOMIC:mips:toolchain-clang = "${@bb.utils.contains('PTEST_ENABLED', '1', '-DCEREAL_THREAD_LIBS="-latomic"', '', d)}"

PACKAGECONFIG ??= "${@bb.utils.contains('PTEST_ENABLED', '1', 'with-tests', '', d)}"
PACKAGECONFIG[with-tests] = "-DWITH_WERROR=OFF -DBUILD_TESTS=ON ${LIBATOMIC},,"
EXTRA_OECMAKE = "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', '', '-DJUST_INSTALL_CEREAL=ON', d)} \
                 ${@['','-DSKIP_PORTABILITY_TEST=ON'][d.getVar('SITEINFO_BITS') != '32']}"

do_install_ptest() {
    install -d ${D}${PTEST_PATH}/tests
    cp ${B}/unittests/test_*  ${D}${PTEST_PATH}/tests
}

ALLOW_EMPTY:${PN} = "1"

RDEPENDS:${PN}-dev = ""

BBCLASSEXTEND = "native nativesdk"