generated from EVerest/everest-template
-
Notifications
You must be signed in to change notification settings - Fork 11
json-rpc-cxx: add header-only library recipe for RpcApi module #69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
barsnick
wants to merge
1
commit into
kirkstone
Choose a base branch
from
feature/kirkstone-add-json-rpc-cxx
base: kirkstone
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
recipes-devtools/json-rpc-cxx/files/json-rpc-cxxConfig.cmake
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| # Minimal CMake config for header-only json-rpc-cxx | ||
|
|
||
| # Define INTERFACE library target | ||
| add_library(json-rpc-cxx INTERFACE) | ||
|
|
||
| # Compute the include and library directories relative to this file. | ||
|
|
||
| get_filename_component(_JSONRPCCXX_CMAKEDIR "${CMAKE_CURRENT_LIST_DIR}/../" REALPATH) | ||
| message(STATUS "Found json-rpc-cxx cmake config in ${CMAKE_CURRENT_LIST_DIR}, CMake dir is ${_JSONRPCCXX_CMAKEDIR}") | ||
|
|
||
| # We will get deployed in ${INSTALL_PREFIX}/lib/cmake/json-rpc-cxx | ||
| # and need to find ${INSTALL_PREFIX}/include. | ||
| get_filename_component(_JSONRPCCXX_INCLUDEDIR | ||
| "${_JSONRPCCXX_CMAKEDIR}/../../include/" | ||
| ABSOLUTE | ||
| ) | ||
| message(STATUS "Setting json-rpc-cxx include dir to ${_JSONRPCCXX_INCLUDEDIR}") | ||
| # get_filename_component(_JSONRPCCXX_LIBDIR "${_JSONRPCCXX_CMAKEDIR}/../" ABSOLUTE) | ||
|
|
||
| # Add include directory | ||
| target_include_directories(json-rpc-cxx INTERFACE | ||
| ${_JSONRPCCXX_INCLUDEDIR} | ||
| ) | ||
|
|
||
| # Ensure dependency on nlohmann_json is pulled in | ||
| include(CMakeFindDependencyMacro) | ||
| find_dependency(nlohmann_json) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| SUMMARY = "JSON-RPC 2.0 framework for modern C++ (json-rpc-cxx)" | ||
| HOMEPAGE = "https://github.com/jsonrpcx/json-rpc-cxx" | ||
| LICENSE = "MIT" | ||
| LIC_FILES_CHKSUM = "file://LICENSE;md5=23722aabb609187e801a18422ee3abb7" | ||
|
|
||
| SRC_URI = "git://github.com/jsonrpcx/json-rpc-cxx.git;protocol=https;branch=master \ | ||
| file://json-rpc-cxxConfig.cmake \ | ||
| " | ||
| SRCREV = "a0e195b575d62cb07016321ac9cd7e1b9e048fe5" | ||
|
|
||
| inherit cmake | ||
|
|
||
| S = "${WORKDIR}/git" | ||
|
|
||
| RDEPENDS:${PN}-dev = "nlohmann-json-dev" | ||
|
|
||
| EXTRA_OECMAKE = "-DCOMPILE_TESTS=OFF -DCOMPILE_EXAMPLES=OFF -DCODE_COVERAGE=OFF" | ||
|
|
||
| do_install:append() { | ||
| install -d ${D}${libdir}/cmake/json-rpc-cxx | ||
| install -p -m 0644 ${WORKDIR}/json-rpc-cxxConfig.cmake \ | ||
| ${D}${libdir}/cmake/json-rpc-cxx/ | ||
| } | ||
|
|
||
| FILES:${PN}-dev += "${libdir}/cmake/json-rpc-cxx" | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line might not even be needed.