Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
338e0db7
Commit
338e0db7
authored
Jan 06, 2008
by
f3nix
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Debug build should be easier now. See how-to-build-kicad.txt. Tested on linux only.
parent
f77e47dc
Changes
11
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
1184 additions
and
93 deletions
+1184
-93
CMakeLists.txt
3d-viewer/CMakeLists.txt
+0
-8
CMake.TODO
CMake.TODO
+0
-3
CMakeLists.txt
CMakeLists.txt
+55
-41
FindPackageHandleStandardArgs.cmake
CMakeModules/FindPackageHandleStandardArgs.cmake
+56
-0
FindwxWidgetsCVS.cmake
CMakeModules/FindwxWidgetsCVS.cmake
+971
-0
UsewxWidgets.cmake
CMakeModules/UsewxWidgets.cmake
+73
-0
CMakeLists.txt
cvpcb/CMakeLists.txt
+1
-1
CMakeLists.txt
help/CMakeLists.txt
+0
-1
how-to-build-kicad.txt
how-to-build-kicad.txt
+25
-36
CMakeLists.txt
kicad/CMakeLists.txt
+2
-2
CMakeLists.txt
pcbnew/CMakeLists.txt
+1
-1
No files found.
3d-viewer/CMakeLists.txt
View file @
338e0db7
FIND_PACKAGE
(
OpenGL
)
IF
(
OPENGL_FOUND
)
MESSAGE
(
STATUS
"Check for installed OpenGL -- found"
)
ELSE
(
OPENGL_FOUND
)
MESSAGE
(
STATUS
"Check for installed OpenGL -- not found"
)
MESSAGE
(
FATAL_ERROR
"OpenGL was not found - it is required to build KiCad"
)
ENDIF
(
OPENGL_FOUND
)
ADD_DEFINITIONS
(
-DPCBNEW
)
ADD_DEFINITIONS
(
-DPCBNEW
)
INCLUDE_DIRECTORIES
(
INCLUDE_DIRECTORIES
(
...
...
CMake.TODO
View file @
338e0db7
TODO:
TODO:
* Fix minizip build on windows.
* Fix minizip build on windows.
* Add install targets for binaries, docs, translations, libraries on Mac.
* Add install targets for binaries, docs, translations, libraries on Mac.
Linux version has a preliminary support.
Windows version has a preliminary support.
* Add DEBUG.
* Add PYTHON.
* Add PYTHON.
* Add shared/static.
* Add shared/static.
* Testing.
* Testing.
...
...
CMakeLists.txt
View file @
338e0db7
# Our project is called 'kicad'. This is what it will be called in
# Our project is called 'kicad'. This is what it will be called in
#
Visual Studio and in
our makefiles.
# our makefiles.
PROJECT
(
kicad
)
PROJECT
(
kicad
)
CMAKE_MINIMUM_REQUIRED
(
VERSION 2.4.6 FATAL_ERROR
)
CMAKE_MINIMUM_REQUIRED
(
VERSION 2.4.6 FATAL_ERROR
)
# Uncomment this line if you want verbose build messages.
# Path to local CMake modules
#SET(CMAKE_VERBOSE_MAKEFILE ON)
SET
(
CMAKE_MODULE_PATH
${
PROJECT_SOURCE_DIR
}
/CMakeModules
)
# List of variables that may be set from command line:
# CMAKE_VERBOSE_MAKEFILE ON/OFF (OPTIONAL)
# Turns ON/OFF verbose build messages.
#
# CMAKE_BUILD_TYPE Release/Debug (REQUIRED)
#
#
# wxWidgets_USE_DEBUG ON/OFF (REQUIRED)
# Should be set to ON only when CMAKE_BUILD_TYPE=Debug.
#
# CMAKE_INSTALL_PREFIX (OPTIONAL)
#
# Comment this out if you don't want to build minizip.
# Comment this out if you don't want to build minizip.
SET
(
BUIL
D_MINIZIP ON CACHE BOOL
"Build minizip?"
)
SET
(
KICA
D_MINIZIP ON CACHE BOOL
"Build minizip?"
)
# Set default flags for Debug build.
# Comment this out if you don't want to build with Python support.
SET
(
CMAKE_C_FLAGS_DEBUG
"-Wall -g3 -ggdb3 -DDEBUG"
)
# SET(KICAD_PYTHON ON CACHE BOOL "Build with Python support?")
SET
(
CMAKE_CXX_FLAGS_DEBUG
"-Wall -g3 -ggdb3 -DDEBUG"
)
# Set default flags for Release build.
# Set default flags for Release build.
SET
(
CMAKE_C_FLAGS_RELEASE
"-Wall -O2 -DNDEBUG"
)
SET
(
CMAKE_C_FLAGS_RELEASE
"-Wall -O2 -DNDEBUG"
)
SET
(
CMAKE_CXX_FLAGS_RELEASE
"-Wall -O2 -DNDEBUG"
)
SET
(
CMAKE_CXX_FLAGS_RELEASE
"-Wall -O2 -DNDEBUG"
)
SET
(
CMAKE_EXE_LINKER_FLAGS_RELEASE
"-s"
)
SET
(
CMAKE_EXE_LINKER_FLAGS_RELEASE
"-s"
)
# Here you can define what libraries of wxWidgets you need for your
# Set default flags for Debug build.
# application. You can figure out what libraries you need here;
SET
(
CMAKE_C_FLAGS_DEBUG
"-Wall -g3 -ggdb3 -DDEBUG"
)
# http://www.wxwidgets.org/manuals/2.8/wx_librarieslist.html
SET
(
CMAKE_CXX_FLAGS_DEBUG
"-Wall -g3 -ggdb3 -DDEBUG"
)
SET
(
wxWidgets_USE_LIBS base core adv gl html net
)
# OpenGL support
SET
(
WXWINDOWS_USE_GL 1
)
# We need the Find package for wxWidgets to work.
FIND_PACKAGE
(
wxWidgets REQUIRED
)
# Locations for install targets.
# Locations for install targets.
IF
(
UNIX
)
IF
(
UNIX
)
...
@@ -49,7 +55,7 @@ ENDIF(UNIX)
...
@@ -49,7 +55,7 @@ ENDIF(UNIX)
IF
(
WIN32
)
IF
(
WIN32
)
# Like all variables, CMAKE_INSTALL_PREFIX can be over-ridden on the command line.
# Like all variables, CMAKE_INSTALL_PREFIX can be over-ridden on the command line.
SET
(
CMAKE_INSTALL_PREFIX c:/kicad
)
SET
(
CMAKE_INSTALL_PREFIX c:/kicad
CACHE PATH
""
)
# When used later, "winexe" and others with no leading / is relative to CMAKE_INSTALL_PREFIX.
# When used later, "winexe" and others with no leading / is relative to CMAKE_INSTALL_PREFIX.
SET
(
KICAD_BIN winexe CACHE PATH
"Location of KiCad binaries."
)
SET
(
KICAD_BIN winexe CACHE PATH
"Location of KiCad binaries."
)
SET
(
KICAD_PLUGINS
${
KICAD_BIN
}
/plugins
)
SET
(
KICAD_PLUGINS
${
KICAD_BIN
}
/plugins
)
...
@@ -60,37 +66,45 @@ IF(WIN32)
...
@@ -60,37 +66,45 @@ IF(WIN32)
SET
(
KICAD_TEMPLATE template
)
SET
(
KICAD_TEMPLATE template
)
ENDIF
(
WIN32
)
ENDIF
(
WIN32
)
# Did we find wxWidgets ? This condition will fail
FIND_PACKAGE
(
OpenGL
)
# for as long as the internal vars do not point to
IF
(
OPENGL_FOUND
)
# the proper wxWidgets configuration.
MESSAGE
(
STATUS
"Check for installed OpenGL -- found"
)
ELSE
(
OPENGL_FOUND
)
MESSAGE
(
STATUS
"Check for installed OpenGL -- not found"
)
MESSAGE
(
FATAL_ERROR
"OpenGL was not found - it is required to build KiCad"
)
ENDIF
(
OPENGL_FOUND
)
# 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
SET
(
wxWidgets_USE_LIBS base core adv gl html net
)
FIND_PACKAGE
(
wxWidgetsCVS
)
IF
(
wxWidgets_FOUND
)
IF
(
wxWidgets_FOUND
)
MESSAGE
(
STATUS
"Check for installed wxWidgets -- found"
)
MESSAGE
(
STATUS
"Check for installed wxWidgets -- found"
)
# Include wxWidgets macros.
INCLUDE
(
${
wxWidgets_USE_FILE
}
)
# We define the include paths here.
# Include dirs for wxWidgets was defined before.
INCLUDE_DIRECTORIES
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/include
${
CMAKE_CURRENT_SOURCE_DIR
}
/share
)
# CMake will look in these dirs for nested 'CMakeLists.txt' files.
ADD_SUBDIRECTORY
(
common
)
ADD_SUBDIRECTORY
(
3d-viewer
)
ADD_SUBDIRECTORY
(
cvpcb
)
ADD_SUBDIRECTORY
(
eeschema
)
ADD_SUBDIRECTORY
(
gerbview
)
ADD_SUBDIRECTORY
(
kicad
)
ADD_SUBDIRECTORY
(
pcbnew
)
ADD_SUBDIRECTORY
(
polygon
)
ELSE
(
wxWidgets_FOUND
)
ELSE
(
wxWidgets_FOUND
)
# For convenience. When we cannot continue, inform the user.
MESSAGE
(
STATUS
"Check for installed wxWidgets -- not found"
)
MESSAGE
(
STATUS
"Check for installed wxWidgets -- not found"
)
MESSAGE
(
FATAL_ERROR
"wxWidgets was not found - it is required to build KiCad"
)
MESSAGE
(
FATAL_ERROR
"wxWidgets was not found - it is required to build KiCad"
)
ENDIF
(
wxWidgets_FOUND
)
ENDIF
(
wxWidgets_FOUND
)
# CMake will look at this dirs for nested 'CMakeLists.txt' files.
# Include wxWidgets macros.
INCLUDE
(
${
wxWidgets_USE_FILE
}
)
# Include paths.
INCLUDE_DIRECTORIES
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/include
${
CMAKE_CURRENT_SOURCE_DIR
}
/share
)
# CMake will look in these dirs for nested 'CMakeLists.txt' files.
# Binaries.
ADD_SUBDIRECTORY
(
common
)
ADD_SUBDIRECTORY
(
3d-viewer
)
ADD_SUBDIRECTORY
(
cvpcb
)
ADD_SUBDIRECTORY
(
eeschema
)
ADD_SUBDIRECTORY
(
gerbview
)
ADD_SUBDIRECTORY
(
kicad
)
ADD_SUBDIRECTORY
(
pcbnew
)
ADD_SUBDIRECTORY
(
polygon
)
# Resources.
ADD_SUBDIRECTORY
(
internat
)
ADD_SUBDIRECTORY
(
internat
)
ADD_SUBDIRECTORY
(
help
)
ADD_SUBDIRECTORY
(
help
)
ADD_SUBDIRECTORY
(
library
)
ADD_SUBDIRECTORY
(
library
)
...
...
CMakeModules/FindPackageHandleStandardArgs.cmake
0 → 100644
View file @
338e0db7
# CMake CVS r1.3
# FIND_PACKAGE_HANDLE_STANDARD_ARGS(NAME (DEFAULT_MSG|"Custom failure message") VAR1 ... )
# This macro is intended to be used in FindXXX.cmake modules files.
# It handles the REQUIRED and QUIET argument to FIND_PACKAGE() and
# it also sets the <UPPERCASED_NAME>_FOUND variable.
# The package is found if all variables listed are TRUE.
# Example:
#
# FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2 DEFAULT_MSG LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR)
#
# LibXml2 is considered to be found, if both LIBXML2_LIBRARIES and
# LIBXML2_INCLUDE_DIR are valid. Then also LIBXML2_FOUND is set to TRUE.
# If it is not found and REQUIRED was used, it fails with FATAL_ERROR,
# independent whether QUIET was used or not.
# If it is found, the location is reported using the VAR1 argument, so
# here a message "Found LibXml2: /usr/lib/libxml2.so" will be printed out.
# If the second argument is DEFAULT_MSG, the message in the failure case will
# be "Could NOT find LibXml2", if you don't like this message you can specify
# your own custom failure message there.
MACRO
(
FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FAIL_MSG _VAR1
)
IF
(
"
${
_FAIL_MSG
}
"
STREQUAL
"DEFAULT_MSG"
)
SET
(
_FAIL_MESSAGE
"Could NOT find
${
_NAME
}
"
)
ELSE
(
"
${
_FAIL_MSG
}
"
STREQUAL
"DEFAULT_MSG"
)
SET
(
_FAIL_MESSAGE
"
${
_FAIL_MSG
}
"
)
ENDIF
(
"
${
_FAIL_MSG
}
"
STREQUAL
"DEFAULT_MSG"
)
STRING
(
TOUPPER
${
_NAME
}
_NAME_UPPER
)
SET
(
${
_NAME_UPPER
}
_FOUND TRUE
)
IF
(
NOT
${
_VAR1
}
)
SET
(
${
_NAME_UPPER
}
_FOUND FALSE
)
ENDIF
(
NOT
${
_VAR1
}
)
FOREACH
(
_CURRENT_VAR
${
ARGN
}
)
IF
(
NOT
${
_CURRENT_VAR
}
)
SET
(
${
_NAME_UPPER
}
_FOUND FALSE
)
ENDIF
(
NOT
${
_CURRENT_VAR
}
)
ENDFOREACH
(
_CURRENT_VAR
)
IF
(
${
_NAME_UPPER
}
_FOUND
)
IF
(
NOT
${
_NAME
}
_FIND_QUIETLY
)
MESSAGE
(
STATUS
"Found
${
_NAME
}
:
${${
_VAR1
}}
"
)
ENDIF
(
NOT
${
_NAME
}
_FIND_QUIETLY
)
ELSE
(
${
_NAME_UPPER
}
_FOUND
)
IF
(
${
_NAME
}
_FIND_REQUIRED
)
MESSAGE
(
FATAL_ERROR
"
${
_FAIL_MESSAGE
}
"
)
ELSE
(
${
_NAME
}
_FIND_REQUIRED
)
IF
(
NOT
${
_NAME
}
_FIND_QUIETLY
)
MESSAGE
(
STATUS
"
${
_FAIL_MESSAGE
}
"
)
ENDIF
(
NOT
${
_NAME
}
_FIND_QUIETLY
)
ENDIF
(
${
_NAME
}
_FIND_REQUIRED
)
ENDIF
(
${
_NAME_UPPER
}
_FOUND
)
ENDMACRO
(
FIND_PACKAGE_HANDLE_STANDARD_ARGS
)
CMakeModules/FindwxWidgetsCVS.cmake
0 → 100644
View file @
338e0db7
This diff is collapsed.
Click to expand it.
CMakeModules/UsewxWidgets.cmake
0 → 100644
View file @
338e0db7
# CMake CVS r1.5
# - Convenience include for using wxWidgets library
# Finds if wxWidgets is installed
# and set the appropriate libs, incdirs, flags etc.
# INCLUDE_DIRECTORIES, LINK_DIRECTORIES and ADD_DEFINITIONS
# are called.
#
# USAGE
# SET( wxWidgets_USE_LIBS gl xml xrc ) # optionally: more than wx std libs
# FIND_PACKAGE(wxWidgets REQUIRED)
# INCLUDE( ${xWidgets_USE_FILE} )
# ... add your targets here, e.g. ADD_EXECUTABLE/ ADD_LIBRARY ...
# TARGET_LINK_LIBRARIERS( <yourWxDependantTarget> ${wxWidgets_LIBRARIES})
#
# DEPRECATED
# LINK_LIBRARIES is not called in favor of adding dependencies per target.
#
# AUTHOR
# Jan Woetzel <jw -at- mip.informatik.uni-kiel.de>
# debug message and logging.
# comment these out for distribution
IF
(
NOT LOGFILE
)
# SET(LOGFILE "${PROJECT_BINARY_DIR}/CMakeOutput.log")
ENDIF
(
NOT LOGFILE
)
MACRO
(
MSG _MSG
)
# FILE(APPEND ${LOGFILE} "${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}): ${_MSG}\n")
# MESSAGE(STATUS "${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}): ${_MSG}")
ENDMACRO
(
MSG
)
MSG
(
"wxWidgets_FOUND=
${
wxWidgets_FOUND
}
"
)
IF
(
wxWidgets_FOUND
)
IF
(
wxWidgets_INCLUDE_DIRS
)
IF
(
wxWidgets_INCLUDE_DIRS_NO_SYSTEM
)
INCLUDE_DIRECTORIES
(
${
wxWidgets_INCLUDE_DIRS
}
)
ELSE
(
wxWidgets_INCLUDE_DIRS_NO_SYSTEM
)
INCLUDE_DIRECTORIES
(
SYSTEM
${
wxWidgets_INCLUDE_DIRS
}
)
ENDIF
(
wxWidgets_INCLUDE_DIRS_NO_SYSTEM
)
MSG
(
"wxWidgets_INCLUDE_DIRS=
${
wxWidgets_INCLUDE_DIRS
}
"
)
ENDIF
(
wxWidgets_INCLUDE_DIRS
)
IF
(
wxWidgets_LIBRARY_DIRS
)
LINK_DIRECTORIES
(
${
wxWidgets_LIBRARY_DIRS
}
)
MSG
(
"wxWidgets_LIBRARY_DIRS=
${
wxWidgets_LIBRARY_DIRS
}
"
)
ENDIF
(
wxWidgets_LIBRARY_DIRS
)
IF
(
wxWidgets_DEFINITIONS
)
ADD_DEFINITIONS
(
${
wxWidgets_DEFINITIONS
}
)
MSG
(
"wxWidgets_DEFINITIONS=
${
wxWidgets_DEFINITIONS
}
"
)
ENDIF
(
wxWidgets_DEFINITIONS
)
IF
(
wxWidgets_CXX_FLAGS
)
SET
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
${
wxWidgets_CXX_FLAGS
}
"
)
MSG
(
"wxWidgets_CXX_FLAGS=
${
wxWidgets_CXX_FLAGS
}
"
)
ENDIF
(
wxWidgets_CXX_FLAGS
)
# DEPRECATED JW
# just for backward compatibility: add deps to all targets
# library projects better use advanced FIND_PACKAGE(wxWidgets) directly.
#IF(wxWidgets_LIBRARIES)
# LINK_LIBRARIES(${wxWidgets_LIBRARIES})
# # BUG: str too long: MSG("wxWidgets_LIBRARIES=${wxWidgets_LIBRARIES}")
# IF(LOGFILE)
# FILE(APPEND ${LOGFILE} "${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}): ${wxWidgets_LIBRARIES}\n")
# ENDIF(LOGFILE)
#ENDIF(wxWidgets_LIBRARIES)
ELSE
(
wxWidgets_FOUND
)
MESSAGE
(
"wxWidgets requested but not found."
)
ENDIF
(
wxWidgets_FOUND
)
cvpcb/CMakeLists.txt
View file @
338e0db7
...
@@ -74,6 +74,6 @@ ENDIF(APPLE)
...
@@ -74,6 +74,6 @@ ENDIF(APPLE)
ADD_EXECUTABLE
(
cvpcb WIN32 MACOSX_BUNDLE
${
CVPCB_SRCS
}
${
CVPCB_EXTRA_SRCS
}
${
CVPCB_RESOURCES
}
)
ADD_EXECUTABLE
(
cvpcb WIN32 MACOSX_BUNDLE
${
CVPCB_SRCS
}
${
CVPCB_EXTRA_SRCS
}
${
CVPCB_RESOURCES
}
)
TARGET_LINK_LIBRARIES
(
cvpcb common 3d-viewer polygon
${
wxWidgets_LIBRARIES
}
)
TARGET_LINK_LIBRARIES
(
cvpcb common 3d-viewer polygon
${
wxWidgets_LIBRARIES
}
${
OPENGL_LIBRARIES
}
)
INSTALL
(
TARGETS cvpcb RUNTIME DESTINATION
${
KICAD_BIN
}
COMPONENT binary
)
INSTALL
(
TARGETS cvpcb RUNTIME DESTINATION
${
KICAD_BIN
}
COMPONENT binary
)
help/CMakeLists.txt
View file @
338e0db7
...
@@ -12,4 +12,3 @@ INSTALL(DIRECTORY pt COMPONENT doc-pt
...
@@ -12,4 +12,3 @@ INSTALL(DIRECTORY pt COMPONENT doc-pt
DESTINATION
${
KICAD_DOCS
}
PATTERN
".svn"
EXCLUDE
)
DESTINATION
${
KICAD_DOCS
}
PATTERN
".svn"
EXCLUDE
)
INSTALL
(
DIRECTORY ru COMPONENT doc-ru
INSTALL
(
DIRECTORY ru COMPONENT doc-ru
DESTINATION
${
KICAD_DOCS
}
PATTERN
".svn"
EXCLUDE
)
DESTINATION
${
KICAD_DOCS
}
PATTERN
".svn"
EXCLUDE
)
how-to-build-kicad.txt
View file @
338e0db7
--== How to build kicad using CMAKE ==--
How to build kicad using CMAKE.
First Written: 19-Dec-2007
First Written: 19-Dec-2007
Last Revised: 0
5
-Jan-2008
Last Revised: 0
6
-Jan-2008
Kicad needs wxWidgets, the multi platform G.U.I.
Kicad needs wxWidgets, the multi platform G.U.I.
...
@@ -46,12 +44,6 @@ If windows, then try running g++ and make from within your msys bash shell.
...
@@ -46,12 +44,6 @@ If windows, then try running g++ and make from within your msys bash shell.
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
4) Install wxWidgets [and build it if on windows].
4) Install wxWidgets [and build it if on windows].
If on linux, use your package manager to install shared object libraries and the
development versions of the wxWidgets packages which include the C++ headers. An
alternative is to build static libaries from source. Verify that wx-config is in
your path by running it from a command prompt. Linux users then go to next step.
If on windows, download
If on windows, download
http://prdownloads.sourceforge.net/wxwindows/wxMSW-2.8.7.zip or a newer version.
http://prdownloads.sourceforge.net/wxwindows/wxMSW-2.8.7.zip or a newer version.
Start msys so you have a bash shell. Decide where your wxWidgets build directory
Start msys so you have a bash shell. Decide where your wxWidgets build directory
...
@@ -77,6 +69,12 @@ Verify that wx-config is in your path. Modify your PATH environment variable
...
@@ -77,6 +69,12 @@ Verify that wx-config is in your path. Modify your PATH environment variable
if need be so you can run wx-config from a command prompt. You may have to
if need be so you can run wx-config from a command prompt. You may have to
restart your msys shell, depending on how you modify your PATH.
restart your msys shell, depending on how you modify your PATH.
If on linux, use your package manager to install shared object libraries and the
development versions of the wxWidgets packages which include the C++ headers. An
alternative is to build static libaries from source. Verify that wx-config is in
your path by running it from a command prompt. Linux users then go to next step.
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
5) Install zlib [and build it if on windows].
5) Install zlib [and build it if on windows].
...
@@ -90,6 +88,7 @@ build directory. Change directories into there, and then:
...
@@ -90,6 +88,7 @@ build directory. Change directories into there, and then:
make
make
make install
make install
If linux, use your package manager to install zlib.
If linux, use your package manager to install zlib.
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
...
@@ -100,6 +99,7 @@ Install that and choose to add cmake to your path during installation. You
...
@@ -100,6 +99,7 @@ Install that and choose to add cmake to your path during installation. You
will have to restart and command shells for the new path to take effect.
will have to restart and command shells for the new path to take effect.
Verify that cmake is in your path by trying to run it from a command prompt.
Verify that cmake is in your path by trying to run it from a command prompt.
If linux, use your package manager to install cmake. You should get cmake 2.4.7
If linux, use your package manager to install cmake. You should get cmake 2.4.7
or later. If only an older one is available in your package repository, build
or later. If only an older one is available in your package repository, build
2.4.7 from source. Verify that cmake is in your path by trying to run it from a
2.4.7 from source. Verify that cmake is in your path by trying to run it from a
...
@@ -116,19 +116,18 @@ You can use the subversion repository or a tar file for this. See the wiki.
...
@@ -116,19 +116,18 @@ You can use the subversion repository or a tar file for this. See the wiki.
If windows, go into your msys shell. Linux and windows users both then make
If windows, go into your msys shell. Linux and windows users both then make
two "out of source" build directories:
two "out of source" build directories:
cd <kicadSource>
cd <kicadSource>
mkdir
r
elease
mkdir
-p Build/R
elease
mkdir
d
ebug
mkdir
Build/D
ebug
cd
r
elease
cd
Build/R
elease
On either cmake command line shown below, you can optionally include
On either cmake command line shown below, you can optionally include
-DCMAKE_INSTALL_PREFIX=<finallInstallDir>
-DCMAKE_INSTALL_PREFIX=<finallInstallDir>
before the final .. argument.
If windows, run the following command:
If windows, run the following command:
cmake -G "MSYS Makefiles" -DCMAKE_BUILD_TYPE=Release -DwxWidgets_ROOT_DIR=<wxInstallDir> ..
cmake -G "MSYS Makefiles" -DCMAKE_BUILD_TYPE=Release -DwxWidgets_ROOT_DIR=<wxInstallDir> ..
/../
If linux, run instead the following command:
If linux, run instead the following command:
cmake -DCMAKE_BUILD_TYPE=Release ../
cmake -DCMAKE_BUILD_TYPE=Release ../
../
Take a look at CMakeCache.txt, and in particular CMAKE_INSTALL_PREFIX, which
Take a look at CMakeCache.txt, and in particular CMAKE_INSTALL_PREFIX, which
gives the final install directory. If not what you want, edit it with a text
gives the final install directory. If not what you want, edit it with a text
...
@@ -141,7 +140,7 @@ editor and re-run the same cmake command again, but with no
...
@@ -141,7 +140,7 @@ editor and re-run the same cmake command again, but with no
You compile Kicad here. You will only need to do step 8) again when one of the
You compile Kicad here. You will only need to do step 8) again when one of the
CMakeLists.txt files change. If windows, you must be in your msys shell.
CMakeLists.txt files change. If windows, you must be in your msys shell.
On either platform then:
On either platform then:
cd <kicadSource>/
r
elease
cd <kicadSource>/
Build/R
elease
make
make
[sudo] make install
[sudo] make install
...
@@ -151,34 +150,25 @@ You are now done unless you want to make a Debug build.
...
@@ -151,34 +150,25 @@ You are now done unless you want to make a Debug build.
10) Making a "Debug" build.
10) Making a "Debug" build.
cd <kicadSource>/
d
ebug
cd <kicadSource>/
Build/D
ebug
On either cmake command line shown below, you can optionally include
On either cmake command line shown below, you can optionally include
-DCMAKE_INSTALL_PREFIX=<finallInstallDir> before the final .. argument. Although
-DCMAKE_INSTALL_PREFIX=<finallInstallDir> before the final ..
/../
argument. Although
normally you do not install the Debug binaries, you can debug them where they
normally you do not install the Debug binaries, you can debug them where they
were built.
were built.
If windows, run the following command:
If windows, run the following command:
cmake -G "MSYS Makefiles" -DCMAKE_BUILD_TYPE=Debug -DwxWidgets_
ROOT_DIR=<wxInstallDir> ..
cmake -G "MSYS Makefiles" -DCMAKE_BUILD_TYPE=Debug -DwxWidgets_
USE_DEBUG=ON -DwxWidgets_ROOT_DIR=<wxInstallDir> ../../
If linux, run instead the following command:
If linux, run instead the following command:
cmake -DCMAKE_BUILD_TYPE=Debug ../
cmake -DCMAKE_BUILD_TYPE=Debug -DwxWidgets_USE_DEBUG=ON ../../
Edit CMakeCache.txt, and look for the line that defines wxWidgets_CONFIG_EXECUTABLE:
wxWidgets_CONFIG_EXECUTABLE:FILEPATH=E:/usr/local/bin/wx-config
If you have debug libaries for wxWidgets, which should be the case if you installed
them in linux or if you built them on windows, then add "--debug" to the end of
the wx-config command, for example:
wxWidgets_CONFIG_EXECUTABLE:FILEPATH=E:/usr/local/bin/wx-config --debug
Re-run the same cmake command again as given above for your respective platform.
Make the Debug binaries:
Make the Debug binaries:
make
make
Note that it is easy to build only a specific binary such as pcbnew alone:
-----------------------------------------------------------------------------
Note: that it is easy to build only a specific binary such as pcbnew alone:
make pcbnew
make pcbnew
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
...
@@ -333,4 +323,3 @@ line 410
...
@@ -333,4 +323,3 @@ line 410
if ( !pItem->IsOwnerDrawn() )
if ( !pItem->IsOwnerDrawn() )
must be
must be
if ( !pItem->IsOwnerDrawn() && !pItem->IsSeparator() )
if ( !pItem->IsOwnerDrawn() && !pItem->IsSeparator() )
kicad/CMakeLists.txt
View file @
338e0db7
...
@@ -38,6 +38,6 @@ TARGET_LINK_LIBRARIES(kicad common ${wxWidgets_LIBRARIES})
...
@@ -38,6 +38,6 @@ TARGET_LINK_LIBRARIES(kicad common ${wxWidgets_LIBRARIES})
INSTALL
(
TARGETS kicad RUNTIME DESTINATION
${
KICAD_BIN
}
COMPONENT binary
)
INSTALL
(
TARGETS kicad RUNTIME DESTINATION
${
KICAD_BIN
}
COMPONENT binary
)
IF
(
BUIL
D_MINIZIP
)
IF
(
KICA
D_MINIZIP
)
ADD_SUBDIRECTORY
(
minizip
)
ADD_SUBDIRECTORY
(
minizip
)
ENDIF
(
BUIL
D_MINIZIP
)
ENDIF
(
KICA
D_MINIZIP
)
pcbnew/CMakeLists.txt
View file @
338e0db7
...
@@ -175,6 +175,6 @@ ADD_EXECUTABLE(specctra_test EXCLUDE_FROM_ALL specctra.cpp dsn.cpp )
...
@@ -175,6 +175,6 @@ ADD_EXECUTABLE(specctra_test EXCLUDE_FROM_ALL specctra.cpp dsn.cpp )
TARGET_LINK_LIBRARIES
(
specctra_test common
${
wxWidgets_LIBRARIES
}
)
TARGET_LINK_LIBRARIES
(
specctra_test common
${
wxWidgets_LIBRARIES
}
)
TARGET_LINK_LIBRARIES
(
pcbnew common 3d-viewer polygon
${
wxWidgets_LIBRARIES
}
)
TARGET_LINK_LIBRARIES
(
pcbnew common 3d-viewer polygon
${
wxWidgets_LIBRARIES
}
${
OPENGL_LIBRARIES
}
)
INSTALL
(
TARGETS pcbnew RUNTIME DESTINATION
${
KICAD_BIN
}
COMPONENT binary
)
INSTALL
(
TARGETS pcbnew RUNTIME DESTINATION
${
KICAD_BIN
}
COMPONENT binary
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment