Code comment clean, cmake file cleanup

This commit is contained in:
jerryjacobs 2008-08-11 11:45:29 +00:00
parent 458b45eb79
commit 18b8932b50
9 changed files with 114 additions and 65 deletions

View File

@ -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.
# OPTION(KICAD_PYTHON "enable/disable building with Python support (default OFF)")
#================================================
# Set flags for GCC.
#================================================
if(CMAKE_COMPILER_IS_GNUCXX)
# Set default flags for Release build.
set(CMAKE_C_FLAGS_RELEASE "-Wall -O2 -DNDEBUG")
set(CMAKE_CXX_FLAGS_RELEASE "-Wall -O2 -DNDEBUG")
@ -27,16 +32,21 @@ if(CMAKE_COMPILER_IS_GNUCXX)
# Set default flags for Debug build.
set(CMAKE_C_FLAGS_DEBUG "-Wall -g3 -ggdb3 -DDEBUG")
set(CMAKE_CXX_FLAGS_DEBUG "-Wall -g3 -ggdb3 -DDEBUG")
endif(CMAKE_COMPILER_IS_GNUCXX)
# 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)
# Everything without leading / is relative to CMAKE_INSTALL_PREFIX.
set(KICAD_PLUGINS lib/kicad/plugins CACHE PATH "Location of KiCad plugins.")
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.")
set(KICAD_PLUGINS lib/kicad/plugins
CACHE PATH "Location of KiCad plugins.")
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)
if(WIN32)
@ -48,22 +58,43 @@ if(WIN32)
set(KICAD_DOCS doc CACHE PATH "Location of KiCad documentation files.")
endif(WIN32)
set(KICAD_DEMOS ${KICAD_DATA}/demos CACHE PATH "Location of KiCad demo 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.")
set(KICAD_DEMOS ${KICAD_DATA}/demos
CACHE PATH "Location of KiCad demo 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.
#================================================
include(CheckFindPackageResult)
#######################
# Find OpenGL library #
#######################
find_package(OpenGL)
check_find_package_result(OPENGL_FOUND "OpenGL")
######################
# Find Boost library #
######################
find_package(Boost)
check_find_package_result(Boost_FOUND "Boost")
##########################
# Find wxWidgets library #
##########################
# 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
@ -71,6 +102,8 @@ set(wxWidgets_USE_LIBS base core adv gl html net)
find_package(wxWidgetsCVS)
check_find_package_result(wxWidgets_FOUND "wxWidgets")
# Include wxWidgets macros.
include(${wxWidgets_USE_FILE})
@ -80,18 +113,25 @@ include(MinGWResourceCompiler)
# Automagically create version header file.
# does not work with mingw for me (jpc)
if(UNIX)
include(CreateSVNVersionHeader)
create_svn_version_header()
include(CreateSVNVersionHeader)
create_svn_version_header()
endif(UNIX)
# Include paths.
include_directories(
${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/share
${CMAKE_BINARY_DIR})
include_directories(${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/share
${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(bitmaps)
add_subdirectory(common)
@ -102,21 +142,31 @@ add_subdirectory(kicad)
add_subdirectory(pcbnew)
add_subdirectory(polygon)
add_subdirectory(polygon/kbool/src)
# Resources.
#############
# Resources #
#############
add_subdirectory(demos)
add_subdirectory(internat)
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)
install(FILES share/kicad.desktop
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications
COMPONENT resources)
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications
COMPONENT resources)
install(FILES bitmaps/kicad.png
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/pixmaps
COMPONENT resources)
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/pixmaps
COMPONENT resources)
endif(UNIX)

View File

@ -6,7 +6,7 @@
#define CLASS_SCREEN_H
#ifndef eda_global
#define eda_global extern
#define eda_global extern
#endif
#include "macros.h"

View File

@ -1,8 +1,8 @@
/****************************************************/
/* drawpanel_wxstruct.h: */
/********************************************************/
/* drawpanel_wxstruct.h: */
/* descriptions des principales classes utilisees: */
/* ici classe: "WinEDA_DrawPanel", "BASE_SCREEN" */
/*****************************************************/
/********************************************************/
/* Doit etre inclus dans "wxstruch.h"
*/
@ -12,7 +12,7 @@
#ifndef eda_global
#define eda_global extern
#define eda_global extern
#endif
#include "colors.h"
@ -43,7 +43,7 @@ public:
bool m_Block_Enable; // TRUE to accept Block Commands
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_PanelCursor; // Current mouse cursor shape id for this window
int m_CursorLevel; // Index for cursor redraw in XOR mode
@ -373,4 +373,4 @@ public:
};
#endif /* PANEL_WXSTRUCT_H */
#endif /* #ifndef PANEL_WXSTRUCT_H */

View File

@ -435,14 +435,14 @@ enum main_id {
ID_DE_MORGAN_CONVERT_BUTT,
ID_LIBEDIT_EDIT_PIN_BY_PIN,
ID_LIBEDIT_VIEW_DOC,
ID_LIBEDIT_CHECK_PART,
ID_LIBEDIT_CHECK_PART,
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_ALIAS, // Id selection alias of part (HToolBar, combo box)
ID_LIBEDIT_HTOOL_UNUSED1,
ID_LIBEDIT_HTOOL_UNUSED2,
ID_LIBEDIT_HTOOL_UNUSED3,
ID_LIBEDIT_HTOOL_UNUSED4,
ID_LIBEDIT_HTOOL_UNUSED3,
ID_LIBEDIT_HTOOL_UNUSED4,
/* Id pour VToolBar de Libedit */
ID_LIBEDIT_START_V_TOOL,
@ -658,15 +658,12 @@ enum main_id {
ID_POPUP_PCB_UNUSED6,
ID_POPUP_PCB_UNUSED7,
ID_POPUP_PCB_UNUSED8,
ID_POPUP_PCB_END_RANGE,
// 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_END = MAX_ITEMS_IN_PICKER + ID_POPUP_PCB_ITEM_SELECTION_START,
// 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_END = MAX_ITEMS_IN_PICKER + ID_POPUP_PCB_ITEM_SELECTION_START,
ID_POPUP_PCB_AUTOPLACE_START_RANGE,
ID_POPUP_PCB_AUTOPLACE_FIXE_MODULE,
ID_POPUP_PCB_AUTOPLACE_FREE_MODULE,
ID_POPUP_PCB_AUTOPLACE_FREE_ALL_MODULES,
@ -789,7 +786,7 @@ enum main_id {
ID_MODEDIT_UNUSED7,
ID_MODEDIT_UNUSED8,
// For GERBVIEW only
// For GERBVIEW only /////////////////
ID_GERBVIEW_SHOW_LIST_DCODES,
ID_GERBVIEW_LOAD_DRILL_FILE,
ID_GERBVIEW_LOAD_DCODE_FILE,
@ -806,8 +803,7 @@ enum main_id {
ID_GERBVIEW_UNUSED6,
ID_GERBVIEW_UNUSED7,
ID_GERBVIEW_UNUSED8,
////////////////////
//////////////////////////////////////
ID_EDA_SOCKET_EVENT_SERV,
ID_EDA_SOCKET_EVENT,
@ -874,7 +870,6 @@ enum main_id {
ID_MENU_COMMAND3D_UNUSED5,
ID_MENU_COMMAND3D_UNUSED6,
ID_PCB_MUWAVE_START_CMD,
ID_PCB_MUWAVE_TOOL_DISPLAY_TOOLS,
ID_PCB_MUWAVE_TOOL_SELF_CMD,

View File

@ -4,13 +4,13 @@
#ifndef 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
*/
*/
#define ONLINE_HELP_FILES_FORMAT_IS_PDF
//#define ONLINE_HELP_FILES_FORMAT_IS_HTML
#endif // #ifndef ONLINE_HELP_H
#endif /* #ifndef ONLINE_HELP_H */

View File

@ -1,4 +1,6 @@
/******************/
/* pad_shapes.h */
/******************/
#ifndef PAD_SHAPES_H_
#define PAD_SHAPES_H_
@ -19,9 +21,9 @@
#define PAD_STANDARD 0 // Usual pad
#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)
// reserved, but not yet really used:
#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_ */

View File

@ -6,9 +6,9 @@
#define PLOT_COMMON_H
#ifndef EDA_BASE
#define COMMON_GLOBL extern
#define COMMON_GLOBL extern
#else
#define COMMON_GLOBL
#define COMMON_GLOBL
#endif
@ -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 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 );
void Move_Plume_HPGL( wxPoint pos, int plume );
void Plume_HPGL( int plume );
#endif // PLOT_COMMON_H
#endif /* #ifndef PLOT_COMMON_H */

View File

@ -16,7 +16,7 @@
//#define SPLASH_OK
#ifdef SPLASH_OK
#include <wx/splash.h>
#include <wx/splash.h>
#endif
#include <wx/button.h>
@ -27,7 +27,7 @@
#include "macros.h"
#ifdef KICAD_PYTHON
#include <pyhandler.h>
#include <pyhandler.h>
#endif
/* Routines exportees */
@ -203,7 +203,7 @@ bool WinEDA_App::OnInit()
GetSettings(); // read current setup
m_MainFrame = new WinEDA_MainFrame(this, NULL, wxT("KiCad"),
wxPoint(0,0), wxSize(600,400) );
wxPoint(30,20), wxSize(600,400) );
if(argc > 1 )
m_MainFrame->m_PrjFileName = argv[1];

View File

@ -1,14 +1,16 @@
[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=KiCad
GenericName[en]=KiCad - project manager
GenericName[ru]=KiCad - менеджер проектов
GenericName[nl_NL]=KiCad - Project Beheerder
Comment[en]=Electrical schematic and PCB design suite
Comment[ru]=Комплекс для разработки электрических схем и печатных плат
MimeType=text/pro
Name=KiCad
Comment[nl_NL]=Elektrische schema's en PCB ontwerp Suite
MimeType=text/pro;
Exec=kicad
Icon=kicad
Type=Application
Terminal=false
Categories=Scientific;
Categories=Scientific;Development