summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools/nlohmann-json/nlohmann-json_3.12.0.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-devtools/nlohmann-json/nlohmann-json_3.12.0.bb')
-rw-r--r--meta-oe/recipes-devtools/nlohmann-json/nlohmann-json_3.12.0.bb45
1 files changed, 45 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/nlohmann-json/nlohmann-json_3.12.0.bb b/meta-oe/recipes-devtools/nlohmann-json/nlohmann-json_3.12.0.bb
new file mode 100644
index 0000000000..58567a781e
--- /dev/null
+++ b/meta-oe/recipes-devtools/nlohmann-json/nlohmann-json_3.12.0.bb
@@ -0,0 +1,45 @@
1SUMMARY = "JSON for modern C++"
2HOMEPAGE = "https://nlohmann.github.io/json/"
3SECTION = "libs"
4LICENSE = "MIT"
5LIC_FILES_CHKSUM = "file://LICENSE.MIT;md5=3b489645de9825cca5beeb9a7e18b6eb"
6
7CVE_PRODUCT = "json-for-modern-cpp"
8
9SRC_URI = "git://github.com/nlohmann/json.git;branch=master;protocol=https \
10 git://github.com/nlohmann/json_test_data.git;destsuffix=git/json_test_data;name=json-test-data;branch=master;protocol=https \
11 file://run-ptest \
12"
13
14SRCREV = "55f93686c01528224f448c19128836e7df245f72"
15SRCREV_json-test-data = "a1375cea09d27cc1c4cadb8d00470375b421ac37"
16
17SRCREV_FORMAT .= "_json-test-data"
18
19S = "${WORKDIR}/git"
20
21inherit cmake ptest
22
23EXTRA_OECMAKE += "${@bb.utils.contains('PTEST_ENABLED', '1', '-DJSON_BuildTests=ON -DJSON_TestDataDirectory=${PTEST_PATH}/json_test_data', '-DJSON_BuildTests=OFF', d)}"
24
25# nlohmann-json is a header only C++ library, so the main package will be empty.
26ALLOW_EMPTY:${PN} = "1"
27RDEPENDS:${PN}-dev = ""
28RDEPENDS:${PN}-ptest = "perl locale-base-de-de"
29
30BBCLASSEXTEND = "native nativesdk"
31
32
33do_install_ptest () {
34 install -d ${D}${PTEST_PATH}/tests
35 cp -r ${S}/json_test_data/ ${D}${PTEST_PATH}/
36 cp -r ${B}/tests/test-* ${D}${PTEST_PATH}/tests
37 rm -rf ${D}${PTEST_PATH}/json_test_data/.git
38}
39
40
41# other packages commonly reference the file directly as "json.hpp"
42# create symlink to allow this usage
43do_install:append() {
44 ln -s nlohmann/json.hpp ${D}${includedir}/json.hpp
45}