mirror of
https://github.com/Xahau/xahaud.git
synced 2025-11-21 02:55:50 +00:00
fix cmake & xrpl_core
This commit is contained in:
@@ -97,7 +97,8 @@ echo "-- Install Cmake 3.25.3 --" &&
|
|||||||
pwd &&
|
pwd &&
|
||||||
( wget -nc -q https://github.com/Kitware/CMake/releases/download/v3.25.3/cmake-3.25.3-linux-x86_64.tar.gz; echo "" ) &&
|
( 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/ &&
|
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 --" &&
|
echo "-- Install Boost 1.86.0 --" &&
|
||||||
pwd &&
|
pwd &&
|
||||||
( wget -nc -q https://archives.boost.io/release/1.86.0/source/boost_1_86_0.tar.gz; echo "" ) &&
|
( wget -nc -q https://archives.boost.io/release/1.86.0/source/boost_1_86_0.tar.gz; echo "" ) &&
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
proper targets and export/install
|
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)
|
add_library (nudb INTERFACE)
|
||||||
FetchContent_Declare(
|
FetchContent_Declare(
|
||||||
nudb_src
|
nudb_src
|
||||||
|
|||||||
@@ -136,18 +136,18 @@ set(CMAKE_CURRENT_BINARY_DIR ${output_dir})
|
|||||||
protobuf_generate_cpp(PROTO_SRCS PROTO_HDRS src/ripple/proto/ripple.proto)
|
protobuf_generate_cpp(PROTO_SRCS PROTO_HDRS src/ripple/proto/ripple.proto)
|
||||||
set(CMAKE_CURRENT_BINARY_DIR ${ccbd})
|
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
|
# The generated implementation imports the header relative to the output
|
||||||
# directory.
|
# directory.
|
||||||
$<BUILD_INTERFACE:${output_dir}>
|
$<BUILD_INTERFACE:${output_dir}>
|
||||||
$<BUILD_INTERFACE:${output_dir}/src>
|
$<BUILD_INTERFACE:${output_dir}/src>
|
||||||
)
|
)
|
||||||
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(
|
install(
|
||||||
FILES ${output_dir}/src/ripple/proto/ripple.pb.h
|
FILES ${output_dir}/src/ripple/proto/ripple.pb.h
|
||||||
DESTINATION include/ripple/proto)
|
DESTINATION include/ripple/proto)
|
||||||
target_link_libraries(xrpl_core PUBLIC protobuf::libprotobuf)
|
target_link_libraries(xrpl.libpb PUBLIC protobuf::libprotobuf)
|
||||||
target_compile_options(xrpl_core
|
target_compile_options(xrpl.libpb
|
||||||
PUBLIC
|
PUBLIC
|
||||||
$<$<BOOL:${is_xcode}>:
|
$<$<BOOL:${is_xcode}>:
|
||||||
--system-header-prefix="google/protobuf"
|
--system-header-prefix="google/protobuf"
|
||||||
|
|||||||
@@ -361,24 +361,24 @@ foreach(file ${GRPC_DEFINITION_FILES})
|
|||||||
list(APPEND GRPC_PROTO_HDRS ${hdr_1} ${hdr_2})
|
list(APPEND GRPC_PROTO_HDRS ${hdr_1} ${hdr_2})
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
target_include_directories(xrpl_core SYSTEM PUBLIC
|
target_include_directories(xrpl.libpb SYSTEM PUBLIC
|
||||||
$<BUILD_INTERFACE:${output_dir}>
|
$<BUILD_INTERFACE:${output_dir}>
|
||||||
$<BUILD_INTERFACE:${output_dir}/ripple/proto>
|
$<BUILD_INTERFACE:${output_dir}/ripple/proto>
|
||||||
# The generated sources include headers relative to this path. Fix it later.
|
# The generated sources include headers relative to this path. Fix it later.
|
||||||
$<INSTALL_INTERFACE:include/ripple/proto>
|
$<INSTALL_INTERFACE:include/ripple/proto>
|
||||||
)
|
)
|
||||||
target_sources(xrpl_core PRIVATE ${GRPC_PROTO_SRCS})
|
target_sources(xrpl.libpb PRIVATE ${GRPC_PROTO_SRCS})
|
||||||
install(
|
install(
|
||||||
DIRECTORY ${output_dir}/ripple
|
DIRECTORY ${output_dir}/ripple
|
||||||
DESTINATION include/
|
DESTINATION include/
|
||||||
FILES_MATCHING PATTERN "*.h"
|
FILES_MATCHING PATTERN "*.h"
|
||||||
)
|
)
|
||||||
target_link_libraries(xrpl_core PUBLIC
|
target_link_libraries(xrpl.libpb PUBLIC
|
||||||
"gRPC::grpc++"
|
"gRPC::grpc++"
|
||||||
# libgrpc is missing references.
|
# libgrpc is missing references.
|
||||||
absl::random_random
|
absl::random_random
|
||||||
)
|
)
|
||||||
target_compile_options(xrpl_core
|
target_compile_options(xrpl.libpb
|
||||||
PRIVATE
|
PRIVATE
|
||||||
$<$<BOOL:${MSVC}>:-wd4065>
|
$<$<BOOL:${MSVC}>:-wd4065>
|
||||||
$<$<NOT:$<BOOL:${MSVC}>>:-Wno-deprecated-declarations>
|
$<$<NOT:$<BOOL:${MSVC}>>:-Wno-deprecated-declarations>
|
||||||
|
|||||||
Reference in New Issue
Block a user