Skip to content

Commit f9b43f7

Browse files
committed
Merge #163: cmake, doc: Update build-osx.md
2dc664c cmake, doc: Update `build-osx.md` (Hennadii Stepanov) 1e7a579 fixup! ci: Test CMake edge cases (Hennadii Stepanov) 721251a fixup! cmake: Add `Maintenance` module (Hennadii Stepanov) Pull request description: ACKs for top commit: Sjors: tACK 2dc664c Tree-SHA512: 48aa67d94a1cb61f9c5643b8dac52ffb3cf905647d97313f04637da4befff4d355e876338ec6d5f3b671c12151136029c985a3966e3030c8dc3635a3461d43fb
2 parents c9a125b + 2dc664c commit f9b43f7

File tree

3 files changed

+22
-14
lines changed

3 files changed

+22
-14
lines changed

.github/workflows/cmake.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -606,3 +606,8 @@ jobs:
606606
cmake --install build --prefix install
607607
tree install
608608
./install/bin/bitcoind -version
609+
610+
- name: Deploy
611+
run: |
612+
cmake --build build --target deploy
613+
ls -l build/*.zip

cmake/module/Maintenance.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ function(add_macos_deploy_target)
137137
add_custom_command(
138138
OUTPUT ${CMAKE_BINARY_DIR}/${osx_volname}.zip
139139
COMMAND ${PYTHON_COMMAND} ${CMAKE_SOURCE_DIR}/contrib/macdeploy/macdeployqtplus ${macos_app} ${osx_volname} -translations-dir=${QT_TRANSLATIONS_DIR} -zip
140-
DEPENDS ${macos_app}/Contents/MacOS/Bitcoin-Qt
140+
DEPENDS ${CMAKE_BINARY_DIR}/${macos_app}/Contents/MacOS/Bitcoin-Qt
141141
VERBATIM
142142
)
143143
add_custom_target(deploydir

doc/build-osx.md

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# macOS Build Guide
22

3-
**Updated for MacOS [11.2](https://www.apple.com/macos/big-sur/)**
3+
**Updated for MacOS [14.4](https://www.apple.com/macos/sonoma/)**
44

55
This guide describes how to build bitcoind, command-line utilities, and GUI on macOS
66

@@ -48,7 +48,7 @@ See [dependencies.md](dependencies.md) for a complete overview.
4848
To install, run the following from your terminal:
4949

5050
``` bash
51-
brew install automake libtool boost pkg-config libevent
51+
brew install cmake boost pkg-config libevent
5252
```
5353

5454
### 4. Clone Bitcoin repository
@@ -163,7 +163,7 @@ brew install python
163163

164164
#### Deploy Dependencies
165165

166-
You can deploy a `.zip` containing the Bitcoin Core application using `make deploy`.
166+
You can [deploy](#3-deploy-optional) a `.zip` containing the Bitcoin Core application.
167167
It is required that you have `python` installed.
168168

169169
## Building Bitcoin Core
@@ -179,8 +179,9 @@ If `sqlite` is installed, then descriptor wallet support will also be built.
179179
Additionally, this explicitly disables the GUI.
180180

181181
``` bash
182-
./autogen.sh
183-
./configure --with-gui=no
182+
mkdir build
183+
cd build
184+
cmake -S .. -DWITH_GUI=OFF
184185
```
185186

186187
##### Wallet (only SQlite) and GUI Support:
@@ -191,15 +192,17 @@ If `sqlite` is installed then descriptor wallet functionality will be built.
191192
If `sqlite` is not installed, then wallet functionality will be disabled.
192193

193194
``` bash
194-
./autogen.sh
195-
./configure --without-bdb --with-gui=yes
195+
mkdir build
196+
cd build
197+
cmake -S .. -DWITH_BDB=OFF -DWITH_GUI=Qt5
196198
```
197199

198200
##### No Wallet or GUI
199201

200202
``` bash
201-
./autogen.sh
202-
./configure --without-wallet --with-gui=no
203+
mkdir build
204+
cd build
205+
cmake -S .. -DENABLE_WALLET=OFF -DWITH_GUI=OFF
203206
```
204207

205208
##### Further Configuration
@@ -208,7 +211,7 @@ You may want to dig deeper into the configuration options to achieve your desire
208211
Examine the output of the following command for a full list of configuration options:
209212

210213
``` bash
211-
./configure -help
214+
cmake -S .. -LH
212215
```
213216

214217
### 2. Compile
@@ -217,16 +220,16 @@ After configuration, you are ready to compile.
217220
Run the following in your terminal to compile Bitcoin Core:
218221

219222
``` bash
220-
make # use "-j N" here for N parallel jobs
221-
make check # Run tests if Python 3 is available
223+
cmake --build . # Use "-j N" here for N parallel jobs.
224+
ctest # Run tests if Python 3 is available. Use "-j N" here for N parallel jobs.
222225
```
223226

224227
### 3. Deploy (optional)
225228

226229
You can also create a `.zip` containing the `.app` bundle by running the following command:
227230

228231
``` bash
229-
make deploy
232+
cmake --build . --target deploy
230233
```
231234

232235
## Running Bitcoin Core

0 commit comments

Comments
 (0)