User forums > General (but related to Code::Blocks)
I am planning on Using C::B to compile KiCAD, which parts are OK to put on Wiki?
stahta01:
See http://wiki.codeblocks.org/index.php?title=KiCadBuildQuickRef
A work in progress
I am starting testing the best way to Build KiCAD using Code::Blocks.
My Directions will be based on these links
http://manveru.pl/node/3
http://kicad.svn.sourceforge.net/viewvc/kicad/trunk/kicad/COMPILING.txt?view=markup
http://shoddykid.blogspot.com/2008/07/getting-started-with-boost.html#bboost
http://wiki.codeblocks.org/index.php?title=Using_Boost
http://wiki.codeblocks.org/index.php?title=BoostWindowsQuickRef
--- Code: -----== How to build kicad using CMAKE generated CB Makefiles ==--
First Written: 05-Mar-2009
Last Revised: 06-Mar-2009
Kicad needs wxWidgets, the multi platform G.U.I.
Perform these steps in sequence.
Windows ONLY Directions; will try to add Linux Version in future
A. MinGW GCC Compiler steps
A-1) install "mingw".
A-2) Install zlib.
A-3) Install Boost C++ Template Libraries (*.hpp files)
B. wxWidgets Steps
B-1) Install wxWidgets.
B-2) Build wxWidgets.
C. kicad build using CMake and Code::Blocks Steps
C-1) Install the kicad source tree.
C-2) Install CMAKE
C-3) Install "Code::Blocks"
C-4) Use cmake to build the kicad makefiles.
C-5) Use Code::Blocks to build kicad.
--- End code ---
Tim S
Patch Needed to KiCad SVN Source for Monolithic Build to work; updated patch should not break MultiLib
--- Code: ---Index: kicad/CMakeLists.txt
Index: kicad/CMakeLists.txt
===================================================================
--- kicad/CMakeLists.txt (revision 1641)
+++ kicad/CMakeLists.txt (working copy)
@@ -118,6 +118,11 @@
# application. You can figure out what libraries you need here;
# http://www.wxwidgets.org/manuals/2.8/wx_librarieslist.html
find_package(wxWidgets COMPONENTS gl html adv core net base QUIET)
+IF(wxWidgets_FOUND)
+#
+ELSE(wxWidgets_FOUND)
+ find_package(wxWidgets COMPONENTS mono gl QUIET)
+ENDIF(wxWidgets_FOUND)
check_find_package_result(wxWidgets_FOUND "wxWidgets")
--- End code ---
C-4) Use cmake to build the kicad makefiles. (My Paths Shown Below; will change in real directions)
--- Code: --- CD C:\SourceCode\Projects\EDA\KiCad\kicad-svn\kicad
mkdir build
mkdir build\release
mkdir build\debug
CD build\release
cmake -G "CodeBlocks - MinGW Makefiles" -DZLIB_INCLUDE_DIR=C:/Apps/MinGW_Boost/include -DCMAKE_BUILD_TYPE=Release -DBoost_INCLUDE_DIR=C:/Apps/MinGW_Boost/include/boost-1_38 -DwxWidgets_ROOT_DIR=C:/SourceCode/Projects/wxWidgets/wxWidgets-2.8.x-MonoLib -DwxWidgets_LIB_DIR=C:/SourceCode/Projects/wxWidgets/wxWidgets-2.8.x-MonoLib/lib/gcc_dll -DwxWidgets_CONFIGURATION=mswu -DSubversion_SVN_EXECUTABLE="C:/Program Files (x86)/CollabNet Subversion/svn.exe" ../..
--- End code ---
New Patch for KiCad; waiting on feedback from KiCAd Devs whether MonoLib or MultiLib is proper build type.
--- Code: ---Index: kicad/CMakeLists.txt
===================================================================
--- kicad/CMakeLists.txt (revision 1641)
+++ kicad/CMakeLists.txt (working copy)
@@ -18,6 +18,7 @@
option(KICAD_CYRILLIC "enable/disable building unicode (default OFF)")
option(wxUSE_UNICODE "enable/disable building unicode (default OFF)")
option(KICAD_GOST "enable/disable building unicode (default OFF)")
+option(wxWIDGETS_USE_MULTILIBS "enable/disable building Multiple Library wxWidgets (default ON)" ON)
# Comment this out if you don't want to build with Python support.
# OPTION(KICAD_PYTHON "enable/disable building with Python support (default OFF)")
@@ -117,7 +118,11 @@
# Here you can define what libraries of wxWidgets you need for your
# application. You can figure out what libraries you need here;
# http://www.wxwidgets.org/manuals/2.8/wx_librarieslist.html
-find_package(wxWidgets COMPONENTS gl html adv core net base QUIET)
+if(wxWIDGETS_USE_MULTILIBS)
+ find_package(wxWidgets COMPONENTS gl html adv core net base QUIET)
+else(wxWIDGETS_USE_MULTILIBS)
+ find_package(wxWidgets COMPONENTS mono gl QUIET)
+endif(wxWIDGETS_USE_MULTILIBS)
check_find_package_result(wxWidgets_FOUND "wxWidgets")
--- End code ---
Navigation
[0] Message Index
[*] Previous page
Go to full version