Merge eb51963d87 into merged_master (Bitcoin PR bitcoin/bitcoin#31884)

This commit is contained in:
ivanlele 2026-04-16 12:04:07 +00:00
commit 24b4e88a5f
No known key found for this signature in database
3 changed files with 6 additions and 8 deletions

View file

@ -127,6 +127,10 @@ set_target_properties(bitcoinkernel PROPERTIES
CXX_VISIBILITY_PRESET default
)
# Add a convenience libbitcoinkernel target as a synonym for bitcoinkernel.
add_custom_target(libbitcoinkernel)
add_dependencies(libbitcoinkernel bitcoinkernel)
# When building the static library, install all static libraries the
# bitcoinkernel depends on.
if(NOT BUILD_SHARED_LIBS)
@ -135,6 +139,7 @@ if(NOT BUILD_SHARED_LIBS)
get_target_property(linked_libraries ${target} LINK_LIBRARIES)
foreach(dep ${linked_libraries})
if(TARGET ${dep})
add_dependencies(libbitcoinkernel ${dep})
get_target_property(dep_type ${dep} TYPE)
if(dep_type STREQUAL "STATIC_LIBRARY")
list(APPEND ${libs_out} ${dep})
@ -157,10 +162,6 @@ endif()
configure_file(${PROJECT_SOURCE_DIR}/libbitcoinkernel.pc.in ${PROJECT_BINARY_DIR}/libbitcoinkernel.pc @ONLY)
install(FILES ${PROJECT_BINARY_DIR}/libbitcoinkernel.pc DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig" COMPONENT libbitcoinkernel)
# Add a convenience libbitcoinkernel target as a synonym for bitcoinkernel.
add_custom_target(libbitcoinkernel)
add_dependencies(libbitcoinkernel bitcoinkernel)
install(TARGETS bitcoinkernel
RUNTIME
DESTINATION ${CMAKE_INSTALL_BINDIR}