mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-24 18:23:26 -03:00
build: Add a pkg-config file for libbitcoinkernel
This commit is contained in:
parent
45be32f838
commit
0dd16d7118
2 changed files with 19 additions and 0 deletions
11
libbitcoinkernel.pc.in
Normal file
11
libbitcoinkernel.pc.in
Normal file
|
@ -0,0 +1,11 @@
|
|||
prefix=@CMAKE_INSTALL_PREFIX@
|
||||
exec_prefix=${prefix}
|
||||
libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
|
||||
includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
|
||||
|
||||
Name: @PACKAGE_NAME@ kernel library
|
||||
Description: Experimental library for the Bitcoin Core validation engine.
|
||||
Version: @PACKAGE_VERSION@
|
||||
Libs: -L${libdir} -lbitcoinkernel
|
||||
Libs.private: -L${libdir} @LIBS_PRIVATE@
|
||||
Cflags: -I${includedir}
|
|
@ -119,11 +119,19 @@ if(NOT BUILD_SHARED_LIBS)
|
|||
set(all_kernel_static_link_libs "")
|
||||
get_target_static_link_libs(bitcoinkernel all_kernel_static_link_libs)
|
||||
|
||||
# LIBS_PRIVATE is substituted in the pkg-config file.
|
||||
set(LIBS_PRIVATE "")
|
||||
foreach(lib ${all_kernel_static_link_libs})
|
||||
install(TARGETS ${lib} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
string(APPEND LIBS_PRIVATE " -l${lib}")
|
||||
endforeach()
|
||||
|
||||
string(STRIP "${LIBS_PRIVATE}" LIBS_PRIVATE)
|
||||
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")
|
||||
|
||||
include(GNUInstallDirs)
|
||||
install(TARGETS bitcoinkernel
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
|
|
Loading…
Add table
Reference in a new issue