Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions CMakeUserPresets.macos.sample.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"version": 6,
"configurePresets": [
{
"name": "kichad-macos",
"displayName": "KiChad macOS development build",
"description": "RelWithDebInfo build with QA tests, Homebrew deps, isolated kichad settings",
"generator": "Ninja",
"binaryDir": "${sourceDir}/build/release-macos",
"installDir": "${sourceDir}/build/install-macos",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Darwin"
},
"cacheVariables": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
"CMAKE_INSTALL_PREFIX": "${sourceDir}/build/install-macos",
"CMAKE_PREFIX_PATH": "/opt/homebrew/opt/boost@1.85;/opt/homebrew;/opt/homebrew/opt/protobuf@33",
"Boost_ROOT": "/opt/homebrew/opt/boost@1.85",
"CMAKE_CXX_FLAGS": "-isystem /opt/homebrew/opt/boost@1.85/include",
"CMAKE_C_COMPILER_LAUNCHER": "ccache",
"CMAKE_CXX_COMPILER_LAUNCHER": "ccache",
"PYTHON_FRAMEWORK": "/opt/homebrew/opt/python@3.13/Frameworks/Python.framework",
"PYTHON_EXECUTABLE": "/opt/homebrew/opt/python@3.13/bin/python3.13",
"PYTHON_LIBRARY": "/opt/homebrew/opt/python@3.13/Frameworks/Python.framework/Versions/3.13/lib/libpython3.13.dylib",
"PYTHON_INCLUDE_DIR": "/opt/homebrew/opt/python@3.13/Frameworks/Python.framework/Versions/3.13/include/python3.13",
"OCC_INCLUDE_DIR": "/opt/homebrew/opt/opencascade/include/opencascade",
"OCC_LIBRARY_DIR": "/opt/homebrew/opt/opencascade/lib",
"NGSPICE_LIB_NAME": "ngspice",
"NGSPICE_ROOT_DIR": "/opt/homebrew/opt/libngspice",
"KICAD_BUILD_I18N": "OFF",
"KICAD_BUILD_QA_TESTS": "ON",
"KICAD_CONFIG_DIR": "kichad",
"KICAD_IPC_API": "ON",
"KICAD_VERSION_EXTRA": "KiChad",
"KICAD_SCRIPTING_WXPYTHON": "OFF",
"KICAD_UPDATE_CHECK": "OFF"
}
}
],
"buildPresets": [
{
"name": "kichad-macos",
"displayName": "Build KiChad (macOS)",
"configurePreset": "kichad-macos"
}
],
"testPresets": [
{
"name": "kichad-macos",
"displayName": "Test KiChad (macOS)",
"configurePreset": "kichad-macos",
"environment": {
"KICAD_RUN_FROM_BUILD_DIR": "1"
},
"output": {
"outputOnFailure": true
},
"execution": {
"noTestsAction": "error",
"stopOnFailure": true
}
}
]
}
27 changes: 27 additions & 0 deletions KICHAD.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,33 @@ version and makes the installed launchers self-contained. `./tools/fetch-kicad-l
`./tools/install-kichad-libraries.sh` remain available when only the library runtime needs to be
refreshed. Neither command tracks the libraries' moving development branch.

## macOS development build (experimental)

The qualified platform remains Ubuntu 24.04; macOS is a development convenience only. The tracked
`CMakePresets.json` stays Linux-only by policy, so the macOS configuration ships as a sample user
preset:

```sh
cp CMakeUserPresets.macos.sample.json CMakeUserPresets.json
cmake --preset kichad-macos
cmake --build --preset kichad-macos
```

Notes on the sample:

- Paths assume arm64 Homebrew under `/opt/homebrew`; on Intel Macs substitute `/usr/local`.
- Boost is pinned to the `boost@1.85` keg: Boost 1.90 removed the Boost.Process v1 API used by
`kicad/codex`. If the plain `boost` formula (1.90+) is installed, `brew unlink boost` so its
headers do not shadow 1.85.
- The preset pins the `python@3.13` framework, `protobuf@33`, `opencascade`, and `libngspice`
kegs; install those plus KiCad's usual build dependencies (wxWidgets, ninja, ccache, glew, glm,
cairo, …) from Homebrew.
- Building this source line on macOS requires the toolchain compatibility shims from the
`feature/macos-build-compat` branch until they are merged.
Comment on lines +74 to +75
- Developer builds expect a `codex` executable on `PATH` (distribution packaging is not covered
here). Running the GUI and the QA suite from the build tree additionally needs bundle
scaffolding (SharedSupport data, a `Python.framework` link) that no script creates yet.

## Useful checks

```sh
Expand Down