From c35890d5f8cf00451de479bb7a9c6bb9ff3a2a0c Mon Sep 17 00:00:00 2001 From: Denis Angell Date: Wed, 25 Jun 2025 10:30:30 +0200 Subject: [PATCH] fix cmake & xrpl_core --- build-full.sh | 3 ++- cmake/deps/Nudb.cmake | 2 +- cmake/deps/Protobuf.cmake | 8 ++++---- cmake/deps/gRPC.cmake | 8 ++++---- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/build-full.sh b/build-full.sh index c9e8b889d..da113e642 100644 --- a/build-full.sh +++ b/build-full.sh @@ -97,7 +97,8 @@ echo "-- Install Cmake 3.25.3 --" && pwd && ( wget -nc -q https://github.com/Kitware/CMake/releases/download/v3.25.3/cmake-3.25.3-linux-x86_64.tar.gz; echo "" ) && tar -xzf cmake-3.25.3-linux-x86_64.tar.gz -C /hbb/ && -ln -sf /usr/local/cmake-3.25.0-linux-x86_64/bin/cmake /hbb/bin/cmake && +ln -sf /hbb/cmake-3.25.3-linux-x86_64/bin/cmake /hbb/bin/cmake && +export PATH="/hbb/cmake-3.25.3-linux-x86_64/bin:$PATH" && echo "-- Install Boost 1.86.0 --" && pwd && ( wget -nc -q https://archives.boost.io/release/1.86.0/source/boost_1_86_0.tar.gz; echo "" ) && diff --git a/cmake/deps/Nudb.cmake b/cmake/deps/Nudb.cmake index 9698d3f06..c3b6f770f 100644 --- a/cmake/deps/Nudb.cmake +++ b/cmake/deps/Nudb.cmake @@ -6,7 +6,7 @@ proper targets and export/install #]===================================================================] -if (is_root_project) # NuDB not needed in the case of xrpl_core inclusion build +if (is_root_project) # NuDB not needed in the case of xrpl.libpb inclusion build add_library (nudb INTERFACE) FetchContent_Declare( nudb_src diff --git a/cmake/deps/Protobuf.cmake b/cmake/deps/Protobuf.cmake index b1c4b6c8c..3985886c6 100644 --- a/cmake/deps/Protobuf.cmake +++ b/cmake/deps/Protobuf.cmake @@ -136,18 +136,18 @@ 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}) -target_include_directories(xrpl_core SYSTEM PUBLIC +target_include_directories(xrpl.libpb SYSTEM PUBLIC # The generated implementation imports the header relative to the output # directory. $ $ ) -target_sources(xrpl_core PRIVATE ${output_dir}/src/ripple/proto/ripple.pb.cc) +target_sources(xrpl.libpb 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 +target_link_libraries(xrpl.libpb PUBLIC protobuf::libprotobuf) +target_compile_options(xrpl.libpb PUBLIC $<$: --system-header-prefix="google/protobuf" diff --git a/cmake/deps/gRPC.cmake b/cmake/deps/gRPC.cmake index 794f43a06..14efd6b61 100644 --- a/cmake/deps/gRPC.cmake +++ b/cmake/deps/gRPC.cmake @@ -361,24 +361,24 @@ foreach(file ${GRPC_DEFINITION_FILES}) list(APPEND GRPC_PROTO_HDRS ${hdr_1} ${hdr_2}) endforeach() -target_include_directories(xrpl_core SYSTEM PUBLIC +target_include_directories(xrpl.libpb SYSTEM PUBLIC $ $ # The generated sources include headers relative to this path. Fix it later. $ ) -target_sources(xrpl_core PRIVATE ${GRPC_PROTO_SRCS}) +target_sources(xrpl.libpb PRIVATE ${GRPC_PROTO_SRCS}) install( DIRECTORY ${output_dir}/ripple DESTINATION include/ FILES_MATCHING PATTERN "*.h" ) -target_link_libraries(xrpl_core PUBLIC +target_link_libraries(xrpl.libpb PUBLIC "gRPC::grpc++" # libgrpc is missing references. absl::random_random ) -target_compile_options(xrpl_core +target_compile_options(xrpl.libpb PRIVATE $<$:-wd4065> $<$>:-Wno-deprecated-declarations>