See: hebasto/bitcoin#3
The stuff below has been outdated.
This work is in progress...
Current branch to test: https://github.com/hebasto/bitcoin/commits/cmake/pr
Done:
-
bitcoindexecutable, could be disabled with-DBUILD_DAEMON=OFF -
bitcoin-cliexecutable, could be disabled with-DBUILD_CLI=OFF -
libbitcoinconsensusshared library, could be disabled with-DBUILD_BITCOINCONSENSUS_LIB=OFF -
libbitcoinkernelshared library, could be disabled with-DBUILD_BITCOINKERNEL_LIB=OFF - wallet support (SQLite, not BDB), could be disabled with
-DENABLE_WALLET=OFF -
ccachesupport, could be disabled with-DUSE_CCACHE=OFF - cross-compiling, including Windows builds with
DEBUG=1 - reduce exported symbols support, could be enabled with
-DREDUCE_EXPORTS=ON(broken on macOS yet)
Not implemented yet:
- optional package support
- BDB wallet support
- ...
Need to be fixed:
-
-DREDUCE_EXPORTS=ONon macOS
A benefit to note -- cross compiling libbitcoinconsensus.dll with DEBUG=1 just works (see bitcoin/bitcoin#19772)
- Ubuntu 22.04
- macOS Monterey
- FreeBSD 12.3
rm -rf build && cmake -S . -B build
cmake --build build- OpenBSD 7.1
rm -rf build && cmake -DCMAKE_MAKE_PROGRAM=gmake -S . -B build
cmake --build buildmake -j$(nproc) -C depends HOST=x86_64-w64-mingw32 NO_QT=1
rm -rf build && cmake -C $PWD/depends/x86_64-w64-mingw32/share/depends.cmake -S . -B build
cmake --build build -j$(nproc)make -j$(nproc) -C depends HOST=x86_64-apple-darwin NO_QT=1
rm -rf build && cmake -C $PWD/depends/x86_64-apple-darwin/share/depends.cmake -S . -B build
cmake --build build -j$(nproc)