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)
# 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
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,14 +142,24 @@ 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}
#================================================
# Installation parameters
#================================================
install(FILES install.txt
DESTINATION ${KICAD_DOCS}
COMPONENT resources)
install(FILES freeroute.jnlp DESTINATION ${KICAD_BIN}
install(FILES freeroute.jnlp
DESTINATION ${KICAD_BIN}
COMPONENT resources)
if(UNIX)
......
......@@ -6,7 +6,7 @@
#define CLASS_SCREEN_H
#ifndef eda_global
#define eda_global extern
#define eda_global extern
#endif
#include "macros.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 */
......@@ -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,
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,
......
......@@ -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 */
/******************/
/* 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_ */
......@@ -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
......@@ -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 */
......@@ -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];
......
[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
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