diff options
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.bb | 45 |
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 @@ | |||
| 1 | SUMMARY = "JSON for modern C++" | ||
| 2 | HOMEPAGE = "https://nlohmann.github.io/json/" | ||
| 3 | SECTION = "libs" | ||
| 4 | LICENSE = "MIT" | ||
| 5 | LIC_FILES_CHKSUM = "file://LICENSE.MIT;md5=3b489645de9825cca5beeb9a7e18b6eb" | ||
| 6 | |||
| 7 | CVE_PRODUCT = "json-for-modern-cpp" | ||
| 8 | |||
| 9 | SRC_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 | |||
| 14 | SRCREV = "55f93686c01528224f448c19128836e7df245f72" | ||
| 15 | SRCREV_json-test-data = "a1375cea09d27cc1c4cadb8d00470375b421ac37" | ||
| 16 | |||
| 17 | SRCREV_FORMAT .= "_json-test-data" | ||
| 18 | |||
| 19 | S = "${WORKDIR}/git" | ||
| 20 | |||
| 21 | inherit cmake ptest | ||
| 22 | |||
| 23 | EXTRA_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. | ||
| 26 | ALLOW_EMPTY:${PN} = "1" | ||
| 27 | RDEPENDS:${PN}-dev = "" | ||
| 28 | RDEPENDS:${PN}-ptest = "perl locale-base-de-de" | ||
| 29 | |||
| 30 | BBCLASSEXTEND = "native nativesdk" | ||
| 31 | |||
| 32 | |||
| 33 | do_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 | ||
| 43 | do_install:append() { | ||
| 44 | ln -s nlohmann/json.hpp ${D}${includedir}/json.hpp | ||
| 45 | } | ||
