Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake: Build libbitcoinkernel and bitcoin-chainstate #134

Merged
merged 3 commits into from
Apr 3, 2024

Conversation

hebasto
Copy link
Owner

@hebasto hebasto commented Apr 1, 2024

New build configuration options:

  • -DBUILD_KERNEL_LIB
  • -DBUILD_UTIL_CHAINSTATE

To build a shared libbitcoinkernel, one can specify -DBUILD_SHARED_LIBS=ON.

@hebasto
Copy link
Owner Author

hebasto commented Apr 1, 2024

# incrementally define what to export from the library.
set_target_properties(bitcoinkernel PROPERTIES
CXX_VISIBILITY_PRESET default
)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We currently copy the library to an install directory when running make install, but it seems to be missing in the install dir here.

diff --git a/src/kernel/CMakeLists.txt b/src/kernel/CMakeLists.txt
index cc0263ce3c..620a31134d 100644
--- a/src/kernel/CMakeLists.txt
+++ b/src/kernel/CMakeLists.txt
@@ -108,0 +109,4 @@ set_target_properties(bitcoinkernel PROPERTIES
+
+install(TARGETS bitcoinkernel
+  LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Added.

Copy link

@TheCharlatan TheCharlatan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link

@pablomartin4btc pablomartin4btc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK f9dc316

Tested on Ubuntu 22.04.
...

Configure summary
=================
Executables:

...


  bitcoin-chainstate (experimental) ... OFF
  libbitcoinkernel (experimental) ..... OFF

@hebasto hebasto merged commit 32f15cb into cmake-staging Apr 3, 2024
27 of 29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants