Skip to main content
This guide covers building KiCad from source on various platforms using CMake.

Prerequisites

Required Dependencies

KiCad requires the following libraries and tools:

Build Tools

  • CMake 3.22 or higher (3.28.1+ for MSVC ARM builds)
  • C++20 compiler
    • GCC (Linux)
    • Clang (macOS/Linux)
    • MSVC (Windows)
  • SWIG 4.0 or higher (for Python scripting)

Core Libraries

  • wxWidgets 3.2.0 or higher (gl, aui, adv, html, core, net, base, propgrid, xml, stc, richtext, webview)
  • Boost 1.71.0 or higher (locale, unit_test_framework for QA)
  • OpenGL with GLU
  • GLM 0.9.8 or higher
  • Cairo 1.12 or higher
  • Pixman 0.30 or higher

Additional Libraries

  • Python 3.6 or higher (interpreter and libraries)
  • libgit2 1.5 or higher
  • CURL
  • ZLIB
  • Zstd
  • ngspice (for circuit simulator)
  • OpenCASCADE 7.5.0 or higher (for STEP support)
  • Protobuf (for IPC API)
  • Freetype 2.11.1+ on MSVC
  • HarfBuzz (font support)
  • Fontconfig (font support)

Platform-Specific

  • Linux: GTK3, libspnav (3D mouse), Wayland 1.20+ (optional)
  • Windows: Windows SDK
  • macOS: Xcode Command Line Tools

Quick Start

Basic Build Commands

Important CMake Options

Build Type

Available types:
  • Release - Optimized build (default)
  • Debug - Debug symbols, no optimization
  • RelWithDebInfo - Release with debug info
  • QABuild - Custom QA build without NDEBUG

Installation Prefix

Feature Flags

Python Scripting

Testing and QA

Optional Features

Platform-Specific

Debugging and Development

Compiler Options

Variable Initialization

Installation Locations

Linux

Default locations (with CMAKE_INSTALL_PREFIX=/usr/local):

macOS

Application bundle structure:

Windows

Build Examples

Development Build

Release Build

Minimal Build (No Python)

Troubleshooting

Missing Dependencies

If CMake reports missing packages, install the development packages for your distribution: Ubuntu/Debian:
Fedora:

Build Errors

  • Out of memory: Reduce parallel jobs (make -j2 instead of make -j$(nproc))
  • Compiler version: Ensure you have a C++20 compatible compiler
  • wxWidgets version mismatch: Ensure wxWidgets and wxPython use the same version/toolkit

Advanced Topics

Cross-Compilation

For cross-compilation, set the appropriate CMake toolchain file:

Custom Python Site Packages

Next Steps

After successfully building KiCad:
  1. Run the test suite: ctest --output-on-failure
  2. Review the code style guidelines
  3. Start making changes and submit merge requests