forked from XRPLF/rippled
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix the package recipe for consumers of libxrpl (XRPLF#4631)
- "Rename" the type `LedgerInfo` to `LedgerHeader` (but leave an alias for `LedgerInfo` to not yet disturb existing uses). Put it in its own public header, named after itself, so that it is more easily found. - Move the type `Fees` and NFT serialization functions into public (installed) headers. - Compile the XRPL and gRPC protocol buffers directly into `libxrpl` and install their headers. Fix the Conan recipe to correctly export these types. Addresses change (2) in XRPLF/XRPL-Standards#121. For context: This work supports Clio's dependence on libxrpl. Clio is just an example consumer. These changes should benefit all current and future consumers. --------- Co-authored-by: cyan317 <[email protected]>
- Loading branch information
1 parent
0b674bb
commit bd35b4f
Showing
38 changed files
with
528 additions
and
381 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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 |
---|---|---|
@@ -1,22 +1,27 @@ | ||
find_package(Protobuf 3.8) | ||
|
||
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/proto_gen) | ||
set(output_dir ${CMAKE_BINARY_DIR}/proto_gen) | ||
file(MAKE_DIRECTORY ${output_dir}) | ||
set(ccbd ${CMAKE_CURRENT_BINARY_DIR}) | ||
set(CMAKE_CURRENT_BINARY_DIR ${CMAKE_BINARY_DIR}/proto_gen) | ||
set(CMAKE_CURRENT_BINARY_DIR ${output_dir}) | ||
protobuf_generate_cpp(PROTO_SRCS PROTO_HDRS src/ripple/proto/ripple.proto) | ||
set(CMAKE_CURRENT_BINARY_DIR ${ccbd}) | ||
|
||
add_library(pbufs STATIC ${PROTO_SRCS} ${PROTO_HDRS}) | ||
target_include_directories(pbufs SYSTEM PUBLIC | ||
${CMAKE_BINARY_DIR}/proto_gen | ||
${CMAKE_BINARY_DIR}/proto_gen/src/ripple/proto | ||
target_include_directories(xrpl_core SYSTEM PUBLIC | ||
# The generated implementation imports the header relative to the output | ||
# directory. | ||
$<BUILD_INTERFACE:${output_dir}> | ||
$<BUILD_INTERFACE:${output_dir}/src> | ||
) | ||
target_link_libraries(pbufs protobuf::libprotobuf) | ||
target_compile_options(pbufs | ||
target_sources(xrpl_core PRIVATE ${output_dir}/src/ripple/proto/ripple.pb.cc) | ||
install( | ||
FILES ${output_dir}/src/ripple/proto/ripple.pb.h | ||
DESTINATION include/ripple/proto) | ||
target_link_libraries(xrpl_core PUBLIC protobuf::libprotobuf) | ||
target_compile_options(xrpl_core | ||
PUBLIC | ||
$<$<BOOL:${XCODE}>: | ||
--system-header-prefix="google/protobuf" | ||
-Wno-deprecated-dynamic-exception-spec | ||
> | ||
) | ||
add_library(Ripple::pbufs ALIAS pbufs) |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.