Commit 18b8932b authored by jerryjacobs's avatar jerryjacobs

Code comment clean, cmake file cleanup

parent 458b45eb
...@@ -17,8 +17,13 @@ option(KICAD_MINIZIP "enable/disable building minizip (default ON)" ON) ...@@ -17,8 +17,13 @@ option(KICAD_MINIZIP "enable/disable building minizip (default ON)" ON)
# Comment this out if you don't want to build with Python support. # Comment this out if you don't want to build with Python support.
# OPTION(KICAD_PYTHON "enable/disable building with Python support (default OFF)") # OPTION(KICAD_PYTHON "enable/disable building with Python support (default OFF)")
#================================================
# Set flags for GCC. # Set flags for GCC.
#================================================
if(CMAKE_COMPILER_IS_GNUCXX) if(CMAKE_COMPILER_IS_GNUCXX)
# 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")
...@@ -27,16 +32,21 @@ if(CMAKE_COMPILER_IS_GNUCXX) ...@@ -27,16 +32,21 @@ if(CMAKE_COMPILER_IS_GNUCXX)
# Set default flags for Debug build. # Set default flags for Debug build.
set(CMAKE_C_FLAGS_DEBUG "-Wall -g3 -ggdb3 -DDEBUG") set(CMAKE_C_FLAGS_DEBUG "-Wall -g3 -ggdb3 -DDEBUG")
set(CMAKE_CXX_FLAGS_DEBUG "-Wall -g3 -ggdb3 -DDEBUG") set(CMAKE_CXX_FLAGS_DEBUG "-Wall -g3 -ggdb3 -DDEBUG")
endif(CMAKE_COMPILER_IS_GNUCXX) endif(CMAKE_COMPILER_IS_GNUCXX)
# Locations for install targets. # Locations for install targets.
set(KICAD_BIN bin CACHE PATH "Location of KiCad binaries.") set(KICAD_BIN bin
CACHE PATH "Location of KiCad binaries.")
if(UNIX) if(UNIX)
# Everything without leading / is relative to CMAKE_INSTALL_PREFIX. # Everything without leading / is relative to CMAKE_INSTALL_PREFIX.
set(KICAD_PLUGINS lib/kicad/plugins CACHE PATH "Location of KiCad plugins.") set(KICAD_PLUGINS lib/kicad/plugins
set(KICAD_DATA share/kicad CACHE PATH "Location of KiCad data files.") CACHE PATH "Location of KiCad plugins.")
set(KICAD_DOCS share/doc/kicad CACHE PATH "Location of KiCad documentation files.") set(KICAD_DATA share/kicad
CACHE PATH "Location of KiCad data files.")
set(KICAD_DOCS share/doc/kicad
CACHE PATH "Location of KiCad documentation files.")
endif(UNIX) endif(UNIX)
if(WIN32) if(WIN32)
...@@ -48,22 +58,43 @@ if(WIN32) ...@@ -48,22 +58,43 @@ if(WIN32)
set(KICAD_DOCS doc CACHE PATH "Location of KiCad documentation files.") set(KICAD_DOCS doc CACHE PATH "Location of KiCad documentation files.")
endif(WIN32) endif(WIN32)
set(KICAD_DEMOS ${KICAD_DATA}/demos CACHE PATH "Location of KiCad demo files.") set(KICAD_DEMOS ${KICAD_DATA}/demos
set(KICAD_INTERNAT ${KICAD_DATA}/internat CACHE PATH "Location of KiCad i18n files.") CACHE PATH "Location of KiCad demo files.")
set(KICAD_TEMPLATE ${KICAD_DATA}/template CACHE PATH "Location of KiCad template files.") set(KICAD_INTERNAT ${KICAD_DATA}/internat
CACHE PATH "Location of KiCad i18n files.")
set(KICAD_TEMPLATE ${KICAD_DATA}/template
CACHE PATH "Location of KiCad template files.")
mark_as_advanced(KICAD_BIN
KICAD_PLUGINS
KICAD_DATA
KICAD_DOCS
KICAD_DEMOS
KICAD_INTERNAT
KICAD_TEMPLATE)
mark_as_advanced(KICAD_BIN KICAD_PLUGINS KICAD_DATA KICAD_DOCS
KICAD_DEMOS KICAD_INTERNAT KICAD_TEMPLATE)
#================================================
# Find libraries that are needed to build KiCad. # Find libraries that are needed to build KiCad.
#================================================
include(CheckFindPackageResult) include(CheckFindPackageResult)
#######################
# Find OpenGL library #
#######################
find_package(OpenGL) find_package(OpenGL)
check_find_package_result(OPENGL_FOUND "OpenGL") check_find_package_result(OPENGL_FOUND "OpenGL")
######################
# Find Boost library #
######################
find_package(Boost) find_package(Boost)
check_find_package_result(Boost_FOUND "Boost") check_find_package_result(Boost_FOUND "Boost")
##########################
# Find wxWidgets library #
##########################
# Here you can define what libraries of wxWidgets you need for your # Here you can define what libraries of wxWidgets you need for your
# application. You can figure out what libraries you need here; # application. You can figure out what libraries you need here;
# http://www.wxwidgets.org/manuals/2.8/wx_librarieslist.html # http://www.wxwidgets.org/manuals/2.8/wx_librarieslist.html
...@@ -71,6 +102,8 @@ set(wxWidgets_USE_LIBS base core adv gl html net) ...@@ -71,6 +102,8 @@ set(wxWidgets_USE_LIBS base core adv gl html net)
find_package(wxWidgetsCVS) find_package(wxWidgetsCVS)
check_find_package_result(wxWidgets_FOUND "wxWidgets") check_find_package_result(wxWidgets_FOUND "wxWidgets")
# Include wxWidgets macros. # Include wxWidgets macros.
include(${wxWidgets_USE_FILE}) include(${wxWidgets_USE_FILE})
...@@ -80,18 +113,25 @@ include(MinGWResourceCompiler) ...@@ -80,18 +113,25 @@ include(MinGWResourceCompiler)
# Automagically create version header file. # Automagically create version header file.
# does not work with mingw for me (jpc) # does not work with mingw for me (jpc)
if(UNIX) if(UNIX)
include(CreateSVNVersionHeader) include(CreateSVNVersionHeader)
create_svn_version_header() create_svn_version_header()
endif(UNIX) endif(UNIX)
# Include paths. # Include paths.
include_directories( include_directories(${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/share
${CMAKE_SOURCE_DIR}/share ${CMAKE_BINARY_DIR})
${CMAKE_BINARY_DIR})
# CMake will look in these dirs for nested 'CMakeLists.txt' files.
# Binaries. #================================================
# Let CMake look in these directories for nested
# 'CMakeLists.txt' files to process
#================================================
############
# Binaries #
############
add_subdirectory(3d-viewer) add_subdirectory(3d-viewer)
add_subdirectory(bitmaps) add_subdirectory(bitmaps)
add_subdirectory(common) add_subdirectory(common)
...@@ -102,21 +142,31 @@ add_subdirectory(kicad) ...@@ -102,21 +142,31 @@ add_subdirectory(kicad)
add_subdirectory(pcbnew) add_subdirectory(pcbnew)
add_subdirectory(polygon) add_subdirectory(polygon)
add_subdirectory(polygon/kbool/src) add_subdirectory(polygon/kbool/src)
# Resources.
#############
# Resources #
#############
add_subdirectory(demos) add_subdirectory(demos)
add_subdirectory(internat) add_subdirectory(internat)
add_subdirectory(template) add_subdirectory(template)
install(FILES install.txt DESTINATION ${KICAD_DOCS}
COMPONENT resources)
install(FILES freeroute.jnlp DESTINATION ${KICAD_BIN} #================================================
COMPONENT resources) # Installation parameters
#================================================
install(FILES install.txt
DESTINATION ${KICAD_DOCS}
COMPONENT resources)
install(FILES freeroute.jnlp
DESTINATION ${KICAD_BIN}
COMPONENT resources)
if(UNIX) if(UNIX)
install(FILES share/kicad.desktop install(FILES share/kicad.desktop
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications
COMPONENT resources) COMPONENT resources)
install(FILES bitmaps/kicad.png install(FILES bitmaps/kicad.png
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/pixmaps DESTINATION ${CMAKE_INSTALL_PREFIX}/share/pixmaps
COMPONENT resources) COMPONENT resources)
endif(UNIX) endif(UNIX)
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
#define CLASS_SCREEN_H #define CLASS_SCREEN_H
#ifndef eda_global #ifndef eda_global
#define eda_global extern #define eda_global extern
#endif #endif
#include "macros.h" #include "macros.h"
......
/****************************************************/ /********************************************************/
/* drawpanel_wxstruct.h: */ /* drawpanel_wxstruct.h: */
/* descriptions des principales classes utilisees: */ /* descriptions des principales classes utilisees: */
/* ici classe: "WinEDA_DrawPanel", "BASE_SCREEN" */ /* ici classe: "WinEDA_DrawPanel", "BASE_SCREEN" */
/*****************************************************/ /********************************************************/
/* Doit etre inclus dans "wxstruch.h" /* Doit etre inclus dans "wxstruch.h"
*/ */
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#ifndef eda_global #ifndef eda_global
#define eda_global extern #define eda_global extern
#endif #endif
#include "colors.h" #include "colors.h"
...@@ -43,7 +43,7 @@ public: ...@@ -43,7 +43,7 @@ public:
bool m_Block_Enable; // TRUE to accept Block Commands bool m_Block_Enable; // TRUE to accept Block Commands
int m_CanStartBlock; // >= 0 (or >= n) if a block can start int m_CanStartBlock; // >= 0 (or >= n) if a block can start
// usefull ot avoid false start block in certain cases (like switch from a sheet to an other scheet // usefull to avoid false start block in certain cases (like switch from a sheet to an other scheet
int m_PanelDefaultCursor; // Current mouse cursor default shape id for this window int m_PanelDefaultCursor; // Current mouse cursor default shape id for this window
int m_PanelCursor; // Current mouse cursor shape id for this window int m_PanelCursor; // Current mouse cursor shape id for this window
int m_CursorLevel; // Index for cursor redraw in XOR mode int m_CursorLevel; // Index for cursor redraw in XOR mode
...@@ -373,4 +373,4 @@ public: ...@@ -373,4 +373,4 @@ public:
}; };
#endif /* PANEL_WXSTRUCT_H */ #endif /* #ifndef PANEL_WXSTRUCT_H */
...@@ -435,14 +435,14 @@ enum main_id { ...@@ -435,14 +435,14 @@ enum main_id {
ID_DE_MORGAN_CONVERT_BUTT, ID_DE_MORGAN_CONVERT_BUTT,
ID_LIBEDIT_EDIT_PIN_BY_PIN, ID_LIBEDIT_EDIT_PIN_BY_PIN,
ID_LIBEDIT_VIEW_DOC, ID_LIBEDIT_VIEW_DOC,
ID_LIBEDIT_CHECK_PART, ID_LIBEDIT_CHECK_PART,
ID_LIBEDIT_END_H_TOOL, // End Id for HToolBar (Libedit) ID_LIBEDIT_END_H_TOOL, // End Id for HToolBar (Libedit)
ID_LIBEDIT_SELECT_PART_NUMBER, // Id selection unit of part (HToolBar, combo box) ID_LIBEDIT_SELECT_PART_NUMBER, // Id selection unit of part (HToolBar, combo box)
ID_LIBEDIT_SELECT_ALIAS, // Id selection alias of part (HToolBar, combo box) ID_LIBEDIT_SELECT_ALIAS, // Id selection alias of part (HToolBar, combo box)
ID_LIBEDIT_HTOOL_UNUSED1, ID_LIBEDIT_HTOOL_UNUSED1,
ID_LIBEDIT_HTOOL_UNUSED2, ID_LIBEDIT_HTOOL_UNUSED2,
ID_LIBEDIT_HTOOL_UNUSED3, ID_LIBEDIT_HTOOL_UNUSED3,
ID_LIBEDIT_HTOOL_UNUSED4, ID_LIBEDIT_HTOOL_UNUSED4,
/* Id pour VToolBar de Libedit */ /* Id pour VToolBar de Libedit */
ID_LIBEDIT_START_V_TOOL, ID_LIBEDIT_START_V_TOOL,
...@@ -658,15 +658,12 @@ enum main_id { ...@@ -658,15 +658,12 @@ enum main_id {
ID_POPUP_PCB_UNUSED6, ID_POPUP_PCB_UNUSED6,
ID_POPUP_PCB_UNUSED7, ID_POPUP_PCB_UNUSED7,
ID_POPUP_PCB_UNUSED8, ID_POPUP_PCB_UNUSED8,
ID_POPUP_PCB_END_RANGE, ID_POPUP_PCB_END_RANGE,
// reserve a block of MAX_ITEMS_IN_PICKER ids for the item selection popup // reserve a block of MAX_ITEMS_IN_PICKER ids for the item selection popup
ID_POPUP_PCB_ITEM_SELECTION_START, ID_POPUP_PCB_ITEM_SELECTION_START,
ID_POPUP_PCB_ITEM_SELECTION_END = MAX_ITEMS_IN_PICKER + ID_POPUP_PCB_ITEM_SELECTION_START, ID_POPUP_PCB_ITEM_SELECTION_END = MAX_ITEMS_IN_PICKER + ID_POPUP_PCB_ITEM_SELECTION_START,
ID_POPUP_PCB_AUTOPLACE_START_RANGE, ID_POPUP_PCB_AUTOPLACE_START_RANGE,
ID_POPUP_PCB_AUTOPLACE_FIXE_MODULE, ID_POPUP_PCB_AUTOPLACE_FIXE_MODULE,
ID_POPUP_PCB_AUTOPLACE_FREE_MODULE, ID_POPUP_PCB_AUTOPLACE_FREE_MODULE,
ID_POPUP_PCB_AUTOPLACE_FREE_ALL_MODULES, ID_POPUP_PCB_AUTOPLACE_FREE_ALL_MODULES,
...@@ -789,7 +786,7 @@ enum main_id { ...@@ -789,7 +786,7 @@ enum main_id {
ID_MODEDIT_UNUSED7, ID_MODEDIT_UNUSED7,
ID_MODEDIT_UNUSED8, ID_MODEDIT_UNUSED8,
// For GERBVIEW only // For GERBVIEW only /////////////////
ID_GERBVIEW_SHOW_LIST_DCODES, ID_GERBVIEW_SHOW_LIST_DCODES,
ID_GERBVIEW_LOAD_DRILL_FILE, ID_GERBVIEW_LOAD_DRILL_FILE,
ID_GERBVIEW_LOAD_DCODE_FILE, ID_GERBVIEW_LOAD_DCODE_FILE,
...@@ -806,8 +803,7 @@ enum main_id { ...@@ -806,8 +803,7 @@ enum main_id {
ID_GERBVIEW_UNUSED6, ID_GERBVIEW_UNUSED6,
ID_GERBVIEW_UNUSED7, ID_GERBVIEW_UNUSED7,
ID_GERBVIEW_UNUSED8, ID_GERBVIEW_UNUSED8,
//////////////////////////////////////
////////////////////
ID_EDA_SOCKET_EVENT_SERV, ID_EDA_SOCKET_EVENT_SERV,
ID_EDA_SOCKET_EVENT, ID_EDA_SOCKET_EVENT,
...@@ -874,7 +870,6 @@ enum main_id { ...@@ -874,7 +870,6 @@ enum main_id {
ID_MENU_COMMAND3D_UNUSED5, ID_MENU_COMMAND3D_UNUSED5,
ID_MENU_COMMAND3D_UNUSED6, ID_MENU_COMMAND3D_UNUSED6,
ID_PCB_MUWAVE_START_CMD, ID_PCB_MUWAVE_START_CMD,
ID_PCB_MUWAVE_TOOL_DISPLAY_TOOLS, ID_PCB_MUWAVE_TOOL_DISPLAY_TOOLS,
ID_PCB_MUWAVE_TOOL_SELF_CMD, ID_PCB_MUWAVE_TOOL_SELF_CMD,
......
...@@ -4,13 +4,13 @@ ...@@ -4,13 +4,13 @@
#ifndef ONLINE_HELP_H #ifndef ONLINE_HELP_H
#define ONLINE_HELP_H #define ONLINE_HELP_H
/* Kicad uses HTML or PDF file format in the online help (help command)
/*
* Kicad uses HTML or PDF file format in the online help (help command)
* Comment one of these 2 lines * Comment one of these 2 lines
*/ */
#define ONLINE_HELP_FILES_FORMAT_IS_PDF #define ONLINE_HELP_FILES_FORMAT_IS_PDF
//#define ONLINE_HELP_FILES_FORMAT_IS_HTML //#define ONLINE_HELP_FILES_FORMAT_IS_HTML
#endif /* #ifndef ONLINE_HELP_H */
#endif // #ifndef ONLINE_HELP_H
/******************/
/* pad_shapes.h */
/******************/
#ifndef PAD_SHAPES_H_ #ifndef PAD_SHAPES_H_
#define PAD_SHAPES_H_ #define PAD_SHAPES_H_
...@@ -19,9 +21,9 @@ ...@@ -19,9 +21,9 @@
#define PAD_STANDARD 0 // Usual pad #define PAD_STANDARD 0 // Usual pad
#define PAD_SMD 1 // Smd pad, appears on the layer paste (default) #define PAD_SMD 1 // Smd pad, appears on the layer paste (default)
#define PAD_CONN 2 // Like smd, does not appear on the layer paste (default) #define PAD_CONN 2 // Like smd, does not appear on the layer paste (default)
// reserved, but not yet really used: // reserved, but not yet really used:
#define PAD_HOLE_NOT_PLATED 3 // like PAD_STANDARD, but not plated (no connection between copper layers) #define PAD_HOLE_NOT_PLATED 3 // like PAD_STANDARD, but not plated (no connection between copper layers)
#endif // PAD_SHAPES_H_ #endif /* #ifndef PAD_SHAPES_H_ */
...@@ -6,9 +6,9 @@ ...@@ -6,9 +6,9 @@
#define PLOT_COMMON_H #define PLOT_COMMON_H
#ifndef EDA_BASE #ifndef EDA_BASE
#define COMMON_GLOBL extern #define COMMON_GLOBL extern
#else #else
#define COMMON_GLOBL #define COMMON_GLOBL
#endif #endif
...@@ -33,7 +33,7 @@ const int PLOT_MIROIR = 1; ...@@ -33,7 +33,7 @@ const int PLOT_MIROIR = 1;
/*******************************/ /*******************************/
/* common_plot_functions.cpp */ /* common_plot_functions.cpp */
/*******************************/ /*******************************/
void SetPlotScale( double xscale, double yscale ); // Set the plot scale for the current plotting) void SetPlotScale( double xscale, double yscale ); // Set the plot scale for the current plotting)
void SetPlotOffset( wxPoint offset ); // Set the plot offset for the current plotting) void SetPlotOffset( wxPoint offset ); // Set the plot offset for the current plotting)
...@@ -92,4 +92,4 @@ void PlotPolyHPGL( int nb, int* coord, bool fill, int width = -1 ); ...@@ -92,4 +92,4 @@ void PlotPolyHPGL( int nb, int* coord, bool fill, int width = -1 );
void Move_Plume_HPGL( wxPoint pos, int plume ); void Move_Plume_HPGL( wxPoint pos, int plume );
void Plume_HPGL( int plume ); void Plume_HPGL( int plume );
#endif // PLOT_COMMON_H #endif /* #ifndef PLOT_COMMON_H */
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
//#define SPLASH_OK //#define SPLASH_OK
#ifdef SPLASH_OK #ifdef SPLASH_OK
#include <wx/splash.h> #include <wx/splash.h>
#endif #endif
#include <wx/button.h> #include <wx/button.h>
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include "macros.h" #include "macros.h"
#ifdef KICAD_PYTHON #ifdef KICAD_PYTHON
#include <pyhandler.h> #include <pyhandler.h>
#endif #endif
/* Routines exportees */ /* Routines exportees */
...@@ -203,7 +203,7 @@ bool WinEDA_App::OnInit() ...@@ -203,7 +203,7 @@ bool WinEDA_App::OnInit()
GetSettings(); // read current setup GetSettings(); // read current setup
m_MainFrame = new WinEDA_MainFrame(this, NULL, wxT("KiCad"), m_MainFrame = new WinEDA_MainFrame(this, NULL, wxT("KiCad"),
wxPoint(0,0), wxSize(600,400) ); wxPoint(30,20), wxSize(600,400) );
if(argc > 1 ) if(argc > 1 )
m_MainFrame->m_PrjFileName = argv[1]; m_MainFrame->m_PrjFileName = argv[1];
......
[Desktop Entry] [Desktop Entry]
Version=1.0
Encoding=UTF-8 Encoding=UTF-8
Name=KiCad
GenericName[en]=KiCad - project manager GenericName[en]=KiCad - project manager
GenericName[ru]=KiCad - менеджер проектов GenericName[ru]=KiCad - менеджер проектов
GenericName[nl_NL]=KiCad - Project Beheerder
Comment[en]=Electrical schematic and PCB design suite Comment[en]=Electrical schematic and PCB design suite
Comment[ru]=Комплекс для разработки электрических схем и печатных плат Comment[ru]=Комплекс для разработки электрических схем и печатных плат
MimeType=text/pro Comment[nl_NL]=Elektrische schema's en PCB ontwerp Suite
Name=KiCad MimeType=text/pro;
Exec=kicad Exec=kicad
Icon=kicad Icon=kicad
Type=Application Type=Application
Terminal=false Terminal=false
Categories=Scientific; Categories=Scientific;Development
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment