Commit 18b8932b authored by jerryjacobs's avatar jerryjacobs
Browse files

Code comment clean, cmake file cleanup

parent 458b45eb
Loading
Loading
Loading
Loading
+76 −26
Original line number Original line Diff line number Diff line
@@ -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)
    # 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)
    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
mark_as_advanced(KICAD_BIN 
    KICAD_DEMOS KICAD_INTERNAT KICAD_TEMPLATE)
                 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)
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})


@@ -85,13 +118,20 @@ 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,14 +142,24 @@ 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}


#================================================
# Installation parameters
#================================================
install(FILES install.txt 
        DESTINATION ${KICAD_DOCS}
        COMPONENT resources)
        COMPONENT resources)
install(FILES freeroute.jnlp DESTINATION ${KICAD_BIN}
install(FILES freeroute.jnlp 
        DESTINATION ${KICAD_BIN}
        COMPONENT resources)
        COMPONENT resources)


if(UNIX)
if(UNIX)
+6 −6
Original line number Original line Diff line number Diff line
/****************************************************/
/********************************************************/
/* 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"
 */
 */
@@ -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:
};
};




#endif  /* PANEL_WXSTRUCT_H */
#endif  /* #ifndef PANEL_WXSTRUCT_H */
+8 −13
Original line number Original line Diff line number Diff line
@@ -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 {
	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 {
	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 {
	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,
+5 −5
Original line number Original line Diff line number Diff line
@@ -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
+5 −3
Original line number Original line Diff line number Diff line

/******************/
/*  pad_shapes.h  */
/******************/


#ifndef PAD_SHAPES_H_
#ifndef PAD_SHAPES_H_
#define PAD_SHAPES_H_
#define PAD_SHAPES_H_
@@ -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_ */
Loading