Difference between revisions of "KiCadBuildQuickRef"

From Code::Blocks
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
[[Category:User Documentation]]
 
[[Category:User Documentation]]
== How-to build KiCad with Code::Blocks ==
+
== How-to build KiCad with MSys2 Code::Blocks ==
 
by Tim Stahlhut (stahta01)<br>
 
by Tim Stahlhut (stahta01)<br>
 
===Requirements===
 
===Requirements===
Line 12: Line 12:
  
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
pacman -S --needed cmake git ${MINGW_PACKAGE_PREFIX}-gcc \
+
pacman -S --needed git ${MINGW_PACKAGE_PREFIX}-cmake ${MINGW_PACKAGE_PREFIX}-gcc \
   ${MINGW_PACKAGE_PREFIX}-codeblocks
+
  ${MINGW_PACKAGE_PREFIX}-boost \
 +
  ${MINGW_PACKAGE_PREFIX}-pkgconf \
 +
   ${MINGW_PACKAGE_PREFIX}-codeblocks \
 +
  ${MINGW_PACKAGE_PREFIX}-swig
  
 
pacman -S --needed ${MINGW_PACKAGE_PREFIX}-opencascade \
 
pacman -S --needed ${MINGW_PACKAGE_PREFIX}-opencascade \
 +
  ${MINGW_PACKAGE_PREFIX}-glm \
 +
  ${MINGW_PACKAGE_PREFIX}-libgit2 \
 +
  ${MINGW_PACKAGE_PREFIX}-ngspice \
 +
  ${MINGW_PACKAGE_PREFIX}-nng \
 +
  ${MINGW_PACKAGE_PREFIX}-protobuf \
 
   ${MINGW_PACKAGE_PREFIX}-wxPython
 
   ${MINGW_PACKAGE_PREFIX}-wxPython
 +
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 
===Build KiCad using CMake and Code::Blocks Steps===
 
===Build KiCad using CMake and Code::Blocks Steps===
<syntaxhighlight lang="bash">
+
 
 +
* Clone git repo<syntaxhighlight lang="bash">
 +
mkdir -p ~/devel && cd ~/devel && \
 +
git clone https://github.com/KiCad/kicad-source-mirror.git kicad
 +
 
 +
</syntaxhighlight>
 +
* Create CB Project
 +
<syntaxhighlight lang="bash" line="1">
 +
mkdir -p ~/devel/kicad/cb_build && cd ~/devel/kicad/cb_build && \
 
cmake \
 
cmake \
 
   -DOCC_INCLUDE_DIR="${MINGW_PREFIX}"/include/opencascade \
 
   -DOCC_INCLUDE_DIR="${MINGW_PREFIX}"/include/opencascade \
 
   -DKICAD_BUILD_QA_TESTS=OFF \
 
   -DKICAD_BUILD_QA_TESTS=OFF \
 
   -G"CodeBlocks - MinGW Makefiles" .. > log.txt
 
   -G"CodeBlocks - MinGW Makefiles" .. > log.txt
 +
  
 
</syntaxhighlight>
 
</syntaxhighlight>

Latest revision as of 03:45, 17 May 2025

How-to build KiCad with MSys2 Code::Blocks

by Tim Stahlhut (stahta01)

Requirements

- KiCAD source
- KiCAD depends
- GCC Toolchain
- CMake
- Code::Blocks

MSys2 Mingw Environment package install commands

pacman -S --needed git ${MINGW_PACKAGE_PREFIX}-cmake ${MINGW_PACKAGE_PREFIX}-gcc \
  ${MINGW_PACKAGE_PREFIX}-boost \
  ${MINGW_PACKAGE_PREFIX}-pkgconf \
  ${MINGW_PACKAGE_PREFIX}-codeblocks \
  ${MINGW_PACKAGE_PREFIX}-swig

pacman -S --needed ${MINGW_PACKAGE_PREFIX}-opencascade \
  ${MINGW_PACKAGE_PREFIX}-glm \
  ${MINGW_PACKAGE_PREFIX}-libgit2 \
  ${MINGW_PACKAGE_PREFIX}-ngspice \
  ${MINGW_PACKAGE_PREFIX}-nng \
  ${MINGW_PACKAGE_PREFIX}-protobuf \
  ${MINGW_PACKAGE_PREFIX}-wxPython

Build KiCad using CMake and Code::Blocks Steps

  • Clone git repo
    mkdir -p ~/devel && cd ~/devel && \
    git clone https://github.com/KiCad/kicad-source-mirror.git kicad
  • Create CB Project
mkdir -p ~/devel/kicad/cb_build && cd ~/devel/kicad/cb_build && \
cmake \
  -DOCC_INCLUDE_DIR="${MINGW_PREFIX}"/include/opencascade \
  -DKICAD_BUILD_QA_TESTS=OFF \
  -G"CodeBlocks - MinGW Makefiles" .. > log.txt