Skip to content

Commit 82e16e6

Browse files
hebastoTheCharlatan
authored andcommitted
cmake: Refactor install kernel dependencies
1 parent 42e6277 commit 82e16e6

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/kernel/CMakeLists.txt

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -120,14 +120,10 @@ if(NOT BUILD_SHARED_LIBS)
120120
set(all_kernel_static_link_libs "")
121121
get_target_static_link_libs(bitcoinkernel all_kernel_static_link_libs)
122122

123+
install(TARGETS ${all_kernel_static_link_libs} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Kernel)
124+
list(TRANSFORM all_kernel_static_link_libs PREPEND "-l")
123125
# LIBS_PRIVATE is substituted in the pkg-config file.
124-
set(LIBS_PRIVATE "")
125-
foreach(lib ${all_kernel_static_link_libs})
126-
install(TARGETS ${lib} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Kernel)
127-
string(APPEND LIBS_PRIVATE " -l${lib}")
128-
endforeach()
129-
130-
string(STRIP "${LIBS_PRIVATE}" LIBS_PRIVATE)
126+
list(JOIN all_kernel_static_link_libs " " LIBS_PRIVATE)
131127
endif()
132128

133129
configure_file(${PROJECT_SOURCE_DIR}/libbitcoinkernel.pc.in ${PROJECT_BINARY_DIR}/libbitcoinkernel.pc @ONLY)

0 commit comments

Comments
 (0)