Commit af1c1564 authored by f3nix's avatar f3nix

CMake:

* Change tabs to spaces.
* Make Boost required.
parent 9dcd7924
ADD_DEFINITIONS(-DPCBNEW) ADD_DEFINITIONS(-DPCBNEW)
INCLUDE_DIRECTORIES( INCLUDE_DIRECTORIES(
../pcbnew ../pcbnew
../polygon) ../polygon)
SET(3D-VIEWER_SRCS SET(3D-VIEWER_SRCS
3d_aux.cpp 3d_aux.cpp
3d_canvas.cpp 3d_canvas.cpp
3d_class.cpp 3d_class.cpp
3d_draw.cpp 3d_draw.cpp
3d_frame.cpp 3d_frame.cpp
3d_read_mesh.cpp 3d_read_mesh.cpp
3d_toolbar.cpp 3d_toolbar.cpp
trackball.cpp) trackball.cpp)
ADD_LIBRARY(3d-viewer ${3D-VIEWER_SRCS}) ADD_LIBRARY(3d-viewer ${3D-VIEWER_SRCS})
...@@ -46,53 +46,61 @@ SET(CMAKE_CXX_FLAGS_DEBUG "-Wall -g3 -ggdb3 -DDEBUG") ...@@ -46,53 +46,61 @@ SET(CMAKE_CXX_FLAGS_DEBUG "-Wall -g3 -ggdb3 -DDEBUG")
# Locations for install targets. # Locations for install targets.
IF(UNIX) IF(UNIX)
IF(APPLE) IF(APPLE)
ELSE(APPLE) ELSE(APPLE)
# 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 /usr/local CACHE PATH "") SET(CMAKE_INSTALL_PREFIX /usr/local CACHE PATH "")
# When used later, "bin" and others with no leading / is relative to CMAKE_INSTALL_PREFIX. # When used later, "bin" and others with no leading / is relative to CMAKE_INSTALL_PREFIX.
SET(KICAD_BIN bin CACHE PATH "Location of KiCad binaries.") SET(KICAD_BIN bin CACHE PATH "Location of KiCad binaries.")
SET(KICAD_PLUGINS lib/kicad/plugins CACHE PATH "Location of KiCad plugins.") SET(KICAD_PLUGINS lib/kicad/plugins CACHE PATH "Location of KiCad plugins.")
SET(KICAD_DOCS share/doc/kicad CACHE PATH "Location of KiCad documentation files.") 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_DATA share/kicad CACHE PATH "Location of KiCad data files.")
SET(KICAD_MODULES ${KICAD_DATA}/modules) SET(KICAD_MODULES ${KICAD_DATA}/modules)
SET(KICAD_LIBRARY ${KICAD_DATA}/library) SET(KICAD_LIBRARY ${KICAD_DATA}/library)
SET(KICAD_INTERNAT ${KICAD_DATA}/internat) SET(KICAD_INTERNAT ${KICAD_DATA}/internat)
SET(KICAD_TEMPLATE ${KICAD_DATA}/template) SET(KICAD_TEMPLATE ${KICAD_DATA}/template)
ENDIF(APPLE) ENDIF(APPLE)
ENDIF(UNIX) 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 CACHE PATH "") 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)
SET(KICAD_DOCS help) SET(KICAD_DOCS help)
SET(KICAD_MODULES modules) SET(KICAD_MODULES modules)
SET(KICAD_LIBRARY library) SET(KICAD_LIBRARY library)
SET(KICAD_INTERNAT internat) SET(KICAD_INTERNAT internat)
SET(KICAD_TEMPLATE template) SET(KICAD_TEMPLATE template)
ENDIF(WIN32) ENDIF(WIN32)
FIND_PACKAGE(OpenGL) FIND_PACKAGE(OpenGL)
IF(OPENGL_FOUND) IF(OPENGL_FOUND)
MESSAGE(STATUS "Check for installed OpenGL -- found") MESSAGE(STATUS "Check for installed OpenGL -- found")
ELSE(OPENGL_FOUND) ELSE(OPENGL_FOUND)
MESSAGE(STATUS "Check for installed OpenGL -- not found") MESSAGE(STATUS "Check for installed OpenGL -- not found")
MESSAGE(FATAL_ERROR "OpenGL was not found - it is required to build KiCad") MESSAGE(FATAL_ERROR "OpenGL was not found - it is required to build KiCad")
ENDIF(OPENGL_FOUND) ENDIF(OPENGL_FOUND)
FIND_PACKAGE(Boost)
IF(Boost_FOUND)
MESSAGE(STATUS "Check for installed Boost -- found")
ELSE(Boost_FOUND)
MESSAGE(STATUS "Check for installed Boost -- not found")
MESSAGE(FATAL_ERROR "Boost was not found - it is required to build KiCad")
ENDIF(Boost_FOUND)
# 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
SET(wxWidgets_USE_LIBS base core adv gl html net) SET(wxWidgets_USE_LIBS base core adv gl html net)
FIND_PACKAGE(wxWidgetsCVS) FIND_PACKAGE(wxWidgetsCVS)
IF(wxWidgets_FOUND) IF(wxWidgets_FOUND)
MESSAGE(STATUS "Check for installed wxWidgets -- found") MESSAGE(STATUS "Check for installed wxWidgets -- found")
ELSE(wxWidgets_FOUND) ELSE(wxWidgets_FOUND)
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)
# Include wxWidgets macros. # Include wxWidgets macros.
...@@ -100,8 +108,8 @@ INCLUDE(${wxWidgets_USE_FILE}) ...@@ -100,8 +108,8 @@ INCLUDE(${wxWidgets_USE_FILE})
# Include paths. # Include paths.
INCLUDE_DIRECTORIES( INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_SOURCE_DIR}/include ${CMAKE_CURRENT_SOURCE_DIR}/include
${CMAKE_CURRENT_SOURCE_DIR}/share) ${CMAKE_CURRENT_SOURCE_DIR}/share)
# CMake will look in these dirs for nested 'CMakeLists.txt' files. # CMake will look in these dirs for nested 'CMakeLists.txt' files.
# Binaries. # Binaries.
......
INCLUDE_DIRECTORIES(bitmaps) INCLUDE_DIRECTORIES(bitmaps)
SET(COMMON_SRCS SET(COMMON_SRCS
base_screen.cpp base_screen.cpp
base_struct.cpp base_struct.cpp
basicframe.cpp basicframe.cpp
bitmaps.cpp bitmaps.cpp
block_commande.cpp block_commande.cpp
common.cpp common.cpp
common_plot_functions.cpp common_plot_functions.cpp
common_plotHPGL_functions.cpp common_plotHPGL_functions.cpp
common_plotPS_functions.cpp common_plotPS_functions.cpp
confirm.cpp confirm.cpp
copy_to_clipboard.cpp copy_to_clipboard.cpp
dcsvg.cpp dcsvg.cpp
displlst.cpp displlst.cpp
drawtxt.cpp drawtxt.cpp
edaappl.cpp edaappl.cpp
eda_dde.cpp eda_dde.cpp
eda_doc.cpp eda_doc.cpp
# edamenu.cpp # edamenu.cpp
gestfich.cpp gestfich.cpp
get_component_dialog.cpp get_component_dialog.cpp
gr_basic.cpp gr_basic.cpp
hotkeys_basic.cpp hotkeys_basic.cpp
msgpanel.cpp infospgm.cpp
projet_config.cpp msgpanel.cpp
# pyhandler.cpp projet_config.cpp
selcolor.cpp # pyhandler.cpp
string.cpp selcolor.cpp
toolbars.cpp string.cpp
trigo.cpp toolbars.cpp
worksheet.cpp trigo.cpp
wxwineda.cpp worksheet.cpp
infospgm.cpp) wxwineda.cpp)
ADD_LIBRARY(common ${COMMON_SRCS}) ADD_LIBRARY(common ${COMMON_SRCS})
ADD_DEFINITIONS(-DCVPCB) ADD_DEFINITIONS(-DCVPCB)
INCLUDE_DIRECTORIES( INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
bitmaps bitmaps
../3d-viewer ../3d-viewer
../pcbnew ../pcbnew
../polygon) ../polygon)
SET(CVPCB_SRCS SET(CVPCB_SRCS
autosel.cpp autosel.cpp
cfg.cpp cfg.cpp
class_cvpcb.cpp class_cvpcb.cpp
cvframe.cpp cvframe.cpp
cvpcb.cpp cvpcb.cpp
# dialog_cvpcb_config.cpp # dialog_cvpcb_config.cpp
dialog_display_options.cpp dialog_display_options.cpp
displayframe.cpp displayframe.cpp
genequiv.cpp genequiv.cpp
# genorcad.cpp # genorcad.cpp
init.cpp init.cpp
listboxes.cpp listboxes.cpp
listlib.cpp listlib.cpp
loadcmp.cpp loadcmp.cpp
memoire.cpp memoire.cpp
menucfg.cpp menucfg.cpp
rdpcad.cpp rdpcad.cpp
readschematicnetlist.cpp readschematicnetlist.cpp
savecmp.cpp savecmp.cpp
setvisu.cpp setvisu.cpp
tool_cvpcb.cpp tool_cvpcb.cpp
viewlnet.cpp viewlnet.cpp
viewlogi.cpp viewlogi.cpp
writenetlistpcbnew.cpp) writenetlistpcbnew.cpp)
SET(CVPCB_EXTRA_SRCS SET(CVPCB_EXTRA_SRCS
../pcbnew/basepcbframe.cpp ../pcbnew/basepcbframe.cpp
../pcbnew/class_board.cpp ../pcbnew/class_board.cpp
../pcbnew/class_cotation.cpp ../pcbnew/class_cotation.cpp
../pcbnew/class_drawsegment.cpp ../pcbnew/class_drawsegment.cpp
../pcbnew/class_edge_mod.cpp ../pcbnew/class_edge_mod.cpp
../pcbnew/class_equipot.cpp ../pcbnew/class_equipot.cpp
../pcbnew/class_mire.cpp ../pcbnew/class_mire.cpp
../pcbnew/class_module.cpp ../pcbnew/class_module.cpp
../pcbnew/class_pad.cpp ../pcbnew/class_pad.cpp
../pcbnew/class_pcb_text.cpp ../pcbnew/class_pcb_text.cpp
../pcbnew/class_text_mod.cpp ../pcbnew/class_text_mod.cpp
../pcbnew/class_track.cpp ../pcbnew/class_track.cpp
../pcbnew/class_zone.cpp ../pcbnew/class_zone.cpp
../pcbnew/classpcb.cpp ../pcbnew/classpcb.cpp
../pcbnew/collectors.cpp ../pcbnew/collectors.cpp
../pcbnew/ioascii.cpp ../pcbnew/ioascii.cpp
../pcbnew/tracemod.cpp ../pcbnew/tracemod.cpp
../share/drawframe.cpp ../share/drawframe.cpp
../share/drawpanel.cpp ../share/drawpanel.cpp
../share/zoom.cpp) ../share/zoom.cpp)
IF(WIN32) IF(WIN32)
IF(MINGW) IF(MINGW)
# resource compilation for mingw (http://www.cmake.org/Bug/view.php?id=4068) # resource compilation for mingw (http://www.cmake.org/Bug/view.php?id=4068)
ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/cvpcb_rc.o ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/cvpcb_rc.o
COMMAND windres.exe -I ${CMAKE_CURRENT_SOURCE_DIR}} -I ${wxWidgets_ROOT_DIR}/include COMMAND windres.exe -I ${CMAKE_CURRENT_SOURCE_DIR}} -I ${wxWidgets_ROOT_DIR}/include
-i ${CMAKE_CURRENT_SOURCE_DIR}/cvpcb.rc -i ${CMAKE_CURRENT_SOURCE_DIR}/cvpcb.rc
-o ${CMAKE_CURRENT_BINARY_DIR}/cvpcb_rc.o) -o ${CMAKE_CURRENT_BINARY_DIR}/cvpcb_rc.o)
SET(CVPCB_RESOURCES ${CMAKE_CURRENT_BINARY_DIR}/cvpcb_rc.o) SET(CVPCB_RESOURCES ${CMAKE_CURRENT_BINARY_DIR}/cvpcb_rc.o)
ELSE(MINGW) ELSE(MINGW)
SET(CVPCB_RESOURCES cvpcb.rc) SET(CVPCB_RESOURCES cvpcb.rc)
ENDIF(MINGW) ENDIF(MINGW)
ENDIF(WIN32) ENDIF(WIN32)
IF(APPLE) IF(APPLE)
SET(CVPCB_RESOURCES cvpcb.r) SET(CVPCB_RESOURCES cvpcb.r)
ENDIF(APPLE) 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})
......
ADD_DEFINITIONS(-DEESCHEMA) ADD_DEFINITIONS(-DEESCHEMA)
INCLUDE_DIRECTORIES( INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
bitmaps) bitmaps)
SET(EESCHEMA_SRCS SET(EESCHEMA_SRCS
affiche.cpp affiche.cpp
annotate.cpp annotate.cpp
# annotate_dialog.cpp # annotate_dialog.cpp
block.cpp block.cpp
block_libedit.cpp block_libedit.cpp
busentry.cpp busentry.cpp
bus-wire-junction.cpp bus-wire-junction.cpp
class_hierarchy_sheet.cpp class_hierarchy_sheet.cpp
class_screen.cpp class_screen.cpp
class_text-label.cpp class_text-label.cpp
cleanup.cpp cleanup.cpp
cmpclass.cpp cmpclass.cpp
component_class.cpp component_class.cpp
controle.cpp controle.cpp
cross-probing.cpp cross-probing.cpp
dangling_ends.cpp dangling_ends.cpp
database.cpp database.cpp
delete.cpp delete.cpp
delsheet.cpp delsheet.cpp
dialog_build_BOM.cpp dialog_build_BOM.cpp
# dialog_cmp_graphic_properties.cpp # dialog_cmp_graphic_properties.cpp
dialog_create_component.cpp dialog_create_component.cpp
# dialog_edit_component_in_lib.cpp # dialog_edit_component_in_lib.cpp
# dialog_edit_component_in_schematic.cpp # dialog_edit_component_in_schematic.cpp
# dialog_edit_label.cpp # dialog_edit_label.cpp
dialog_eeschema_config.cpp dialog_eeschema_config.cpp
dialog_erc.cpp dialog_erc.cpp
# dialog_find.cpp # dialog_find.cpp
dialog_options.cpp dialog_options.cpp
# divers.cpp # divers.cpp
edit_component_in_lib.cpp edit_component_in_lib.cpp
edit_component_in_schematic.cpp edit_component_in_schematic.cpp
edit_label.cpp edit_label.cpp
eeconfig.cpp eeconfig.cpp
# eecreate.cpp # eecreate.cpp
eelayer.cpp eelayer.cpp
eelibs_draw_components.cpp eelibs_draw_components.cpp
eelibs_read_libraryfiles.cpp eelibs_read_libraryfiles.cpp
eeload.cpp eeload.cpp
eeredraw.cpp eeredraw.cpp
eeschema.cpp eeschema.cpp
eestring.cpp eestring.cpp
erc.cpp erc.cpp
files-io.cpp files-io.cpp
find.cpp find.cpp
getpart.cpp getpart.cpp
hierarch.cpp hierarch.cpp
hotkeys.cpp hotkeys.cpp
libalias.cpp libalias.cpp
libarch.cpp libarch.cpp
libclass.cpp libclass.cpp
libedit.cpp libedit.cpp
libedit_onleftclick.cpp libedit_onleftclick.cpp
libedit_onrightclick.cpp libedit_onrightclick.cpp
libedit_undo_redo.cpp libedit_undo_redo.cpp
lib_export.cpp lib_export.cpp
libfield.cpp libfield.cpp
libframe.cpp libframe.cpp
load_one_schematic_file.cpp load_one_schematic_file.cpp
locate.cpp locate.cpp
menubar.cpp menubar.cpp
netform.cpp netform.cpp
netlist_control.cpp netlist_control.cpp
netlist.cpp netlist.cpp
onleftclick.cpp onleftclick.cpp
onrightclick.cpp onrightclick.cpp
pinedit.cpp pinedit.cpp
# pinedit-dialog.cpp # pinedit-dialog.cpp
plot.cpp plot.cpp
plothpgl.cpp plothpgl.cpp
plotps.cpp plotps.cpp
priorque.cpp priorque.cpp
savelib.cpp savelib.cpp
save_schemas.cpp save_schemas.cpp
schedit.cpp schedit.cpp
schematic_undo_redo.cpp schematic_undo_redo.cpp
schframe.cpp schframe.cpp
selpart.cpp selpart.cpp
sheet.cpp sheet.cpp
sheetlab.cpp sheetlab.cpp
symbdraw.cpp symbdraw.cpp
symbedit.cpp symbedit.cpp
symbtext.cpp symbtext.cpp
tool_lib.cpp tool_lib.cpp
tool_sch.cpp tool_sch.cpp
tool_viewlib.cpp tool_viewlib.cpp
viewlib_frame.cpp viewlib_frame.cpp
viewlibs.cpp) viewlibs.cpp)
SET(EESCHEMA_EXTRA_SRCS SET(EESCHEMA_EXTRA_SRCS
../share/drawframe.cpp ../share/drawframe.cpp
../share/drawpanel.cpp ../share/drawpanel.cpp
../share/setpage.cpp ../share/setpage.cpp
../share/svg_print.cpp ../share/svg_print.cpp
../share/wxprint.cpp ../share/wxprint.cpp
../share/zoom.cpp) ../share/zoom.cpp)
IF(WIN32) IF(WIN32)
IF(MINGW) IF(MINGW)
# resource compilation for mingw (http://www.cmake.org/Bug/view.php?id=4068) # resource compilation for mingw (http://www.cmake.org/Bug/view.php?id=4068)
ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/eeschema_rc.o ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/eeschema_rc.o
COMMAND windres.exe -I ${CMAKE_CURRENT_SOURCE_DIR}} -I ${wxWidgets_ROOT_DIR}/include COMMAND windres.exe -I ${CMAKE_CURRENT_SOURCE_DIR}} -I ${wxWidgets_ROOT_DIR}/include
-i ${CMAKE_CURRENT_SOURCE_DIR}/eeschema.rc -i ${CMAKE_CURRENT_SOURCE_DIR}/eeschema.rc
-o ${CMAKE_CURRENT_BINARY_DIR}/eeschema_rc.o) -o ${CMAKE_CURRENT_BINARY_DIR}/eeschema_rc.o)
SET(EESCHEMA_RESOURCES ${CMAKE_CURRENT_BINARY_DIR}/eeschema_rc.o) SET(EESCHEMA_RESOURCES ${CMAKE_CURRENT_BINARY_DIR}/eeschema_rc.o)
ELSE(MINGW) ELSE(MINGW)
SET(EESCHEMA_RESOURCES eeschema.rc) SET(EESCHEMA_RESOURCES eeschema.rc)
ENDIF(MINGW) ENDIF(MINGW)
ENDIF(WIN32) ENDIF(WIN32)
IF(APPLE) IF(APPLE)
SET(EESCHEMA_RESOURCES eeschema.r) SET(EESCHEMA_RESOURCES eeschema.r)
ENDIF(APPLE) ENDIF(APPLE)
ADD_EXECUTABLE(eeschema WIN32 MACOSX_BUNDLE ${EESCHEMA_SRCS} ${EESCHEMA_EXTRA_SRCS} ${EESCHEMA_RESOURCES}) ADD_EXECUTABLE(eeschema WIN32 MACOSX_BUNDLE ${EESCHEMA_SRCS} ${EESCHEMA_EXTRA_SRCS} ${EESCHEMA_RESOURCES})
......
IF(UNIX) IF(UNIX)
ADD_DEFINITIONS(-D__UNIX__) ADD_DEFINITIONS(-D__UNIX__)
ENDIF(UNIX) ENDIF(UNIX)
ADD_EXECUTABLE(netlist_form_pads-pcb netlist_form_pads-pcb.cpp) ADD_EXECUTABLE(netlist_form_pads-pcb netlist_form_pads-pcb.cpp)
......
ADD_DEFINITIONS(-DGERBVIEW -DPCBNEW) ADD_DEFINITIONS(-DGERBVIEW -DPCBNEW)
INCLUDE_DIRECTORIES( INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
../3d-viewer ../3d-viewer
../cvpcb ../cvpcb
../pcbnew ../pcbnew
../polygon) ../polygon)
SET(GERBVIEW_SRCS SET(GERBVIEW_SRCS
affiche.cpp affiche.cpp
block.cpp block.cpp
controle.cpp controle.cpp
dcode.cpp dcode.cpp
deltrack.cpp deltrack.cpp
edit.cpp edit.cpp
export_to_pcbnew.cpp export_to_pcbnew.cpp
files.cpp files.cpp
gerberframe.cpp gerberframe.cpp
gerbview_config.cpp gerbview_config.cpp
gerbview.cpp gerbview.cpp
hotkeys.cpp hotkeys.cpp
initpcb.cpp initpcb.cpp
lay2plot.cpp lay2plot.cpp
locate.cpp locate.cpp
onrightclick.cpp onrightclick.cpp
options.cpp options.cpp
pcbplot.cpp pcbplot.cpp
# pcbtexte.cpp # pcbtexte.cpp
# process_config.cpp # process_config.cpp
readgerb.cpp readgerb.cpp
reglage.cpp reglage.cpp
rs274d.cpp rs274d.cpp
rs274x.cpp rs274x.cpp
select_layers_to_pcb.cpp select_layers_to_pcb.cpp
set_color.cpp set_color.cpp
tool_gerber.cpp tool_gerber.cpp
tracepcb.cpp tracepcb.cpp
trpiste.cpp trpiste.cpp
undelete.cpp) undelete.cpp)
SET(GERBVIEW_EXTRA_SRCS SET(GERBVIEW_EXTRA_SRCS
../pcbnew/basepcbframe.cpp ../pcbnew/basepcbframe.cpp
../pcbnew/class_board.cpp ../pcbnew/class_board.cpp
../pcbnew/class_drawsegment.cpp ../pcbnew/class_drawsegment.cpp
../pcbnew/class_drc_item.cpp ../pcbnew/class_drc_item.cpp
../pcbnew/class_marker.cpp ../pcbnew/class_marker.cpp
../pcbnew/class_pcb_text.cpp ../pcbnew/class_pcb_text.cpp
../pcbnew/class_track.cpp ../pcbnew/class_track.cpp
../pcbnew/class_zone.cpp ../pcbnew/class_zone.cpp
../pcbnew/classpcb.cpp ../pcbnew/classpcb.cpp
../pcbnew/collectors.cpp ../pcbnew/collectors.cpp
../pcbnew/sel_layer.cpp ../pcbnew/sel_layer.cpp
../share/drawframe.cpp ../share/drawframe.cpp
../share/drawpanel.cpp ../share/drawpanel.cpp
../share/setpage.cpp ../share/setpage.cpp
../share/wxprint.cpp ../share/wxprint.cpp
../share/zoom.cpp) ../share/zoom.cpp)
IF(WIN32) IF(WIN32)
IF(MINGW) IF(MINGW)
# resource compilation for mingw (http://www.cmake.org/Bug/view.php?id=4068) # resource compilation for mingw (http://www.cmake.org/Bug/view.php?id=4068)
ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/gerbview_rc.o ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/gerbview_rc.o
COMMAND windres.exe -I ${CMAKE_CURRENT_SOURCE_DIR} -I ${wxWidgets_ROOT_DIR}/include COMMAND windres.exe -I ${CMAKE_CURRENT_SOURCE_DIR} -I ${wxWidgets_ROOT_DIR}/include
-i ${CMAKE_CURRENT_SOURCE_DIR}/gerbview.rc -i ${CMAKE_CURRENT_SOURCE_DIR}/gerbview.rc
-o ${CMAKE_CURRENT_BINARY_DIR}/gerbview_rc.o) -o ${CMAKE_CURRENT_BINARY_DIR}/gerbview_rc.o)
SET(GERBVIEW_RESOURCES ${CMAKE_CURRENT_BINARY_DIR}/gerbview_rc.o) SET(GERBVIEW_RESOURCES ${CMAKE_CURRENT_BINARY_DIR}/gerbview_rc.o)
ELSE(MINGW) ELSE(MINGW)
SET(GERBVIEW_RESOURCES gerbview.rc) SET(GERBVIEW_RESOURCES gerbview.rc)
ENDIF(MINGW) ENDIF(MINGW)
ENDIF(WIN32) ENDIF(WIN32)
IF(APPLE) IF(APPLE)
SET(GERBVIEW_RESOURCES gerbview.r) SET(GERBVIEW_RESOURCES gerbview.r)
ENDIF(APPLE) ENDIF(APPLE)
ADD_EXECUTABLE(gerbview WIN32 MACOSX_BUNDLE ${GERBVIEW_SRCS} ${GERBVIEW_EXTRA_SRCS} ${GERBVIEW_RESOURCES}) ADD_EXECUTABLE(gerbview WIN32 MACOSX_BUNDLE ${GERBVIEW_SRCS} ${GERBVIEW_EXTRA_SRCS} ${GERBVIEW_RESOURCES})
......
INSTALL(DIRECTORY de COMPONENT doc-de INSTALL(DIRECTORY de COMPONENT doc-de
DESTINATION ${KICAD_DOCS} PATTERN ".svn" EXCLUDE) DESTINATION ${KICAD_DOCS} PATTERN ".svn" EXCLUDE)
INSTALL(DIRECTORY en COMPONENT doc-en INSTALL(DIRECTORY en COMPONENT doc-en
DESTINATION ${KICAD_DOCS} PATTERN ".svn" EXCLUDE) DESTINATION ${KICAD_DOCS} PATTERN ".svn" EXCLUDE)
INSTALL(DIRECTORY es COMPONENT doc-es INSTALL(DIRECTORY es COMPONENT doc-es
DESTINATION ${KICAD_DOCS} PATTERN ".svn" EXCLUDE) DESTINATION ${KICAD_DOCS} PATTERN ".svn" EXCLUDE)
INSTALL(DIRECTORY fr COMPONENT doc-fr INSTALL(DIRECTORY fr COMPONENT doc-fr
DESTINATION ${KICAD_DOCS} PATTERN ".svn" EXCLUDE) DESTINATION ${KICAD_DOCS} PATTERN ".svn" EXCLUDE)
INSTALL(DIRECTORY it COMPONENT doc-it INSTALL(DIRECTORY it COMPONENT doc-it
DESTINATION ${KICAD_DOCS} PATTERN ".svn" EXCLUDE) DESTINATION ${KICAD_DOCS} PATTERN ".svn" EXCLUDE)
INSTALL(DIRECTORY pt COMPONENT doc-pt 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)
INSTALL(DIRECTORY ca cs de es fr hu it ko pl pt ru sl INSTALL(DIRECTORY ca cs de es fr hu it ko pl pt ru sl
DESTINATION ${KICAD_INTERNAT} COMPONENT resources DESTINATION ${KICAD_INTERNAT} COMPONENT resources
PATTERN ".svn" EXCLUDE) PATTERN ".svn" EXCLUDE)
...@@ -3,30 +3,30 @@ ADD_DEFINITIONS(-DKICAD) ...@@ -3,30 +3,30 @@ ADD_DEFINITIONS(-DKICAD)
INCLUDE_DIRECTORIES(bitmaps) INCLUDE_DIRECTORIES(bitmaps)
SET(KICAD_SRCS SET(KICAD_SRCS
buildmnu.cpp buildmnu.cpp
commandframe.cpp commandframe.cpp
files-io.cpp files-io.cpp
kicad.cpp kicad.cpp
mainframe.cpp mainframe.cpp
preferences.cpp preferences.cpp
prjconfig.cpp prjconfig.cpp
treeprj_datas.cpp treeprj_datas.cpp
treeprj_frame.cpp) treeprj_frame.cpp)
IF(WIN32) IF(WIN32)
IF(MINGW) IF(MINGW)
# resource compilation for mingw (http://www.cmake.org/Bug/view.php?id=4068) # resource compilation for mingw (http://www.cmake.org/Bug/view.php?id=4068)
ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/kicad_rc.o ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/kicad_rc.o
COMMAND windres.exe -I ${CMAKE_CURRENT_SOURCE_DIR}} -I ${wxWidgets_ROOT_DIR}/include COMMAND windres.exe -I ${CMAKE_CURRENT_SOURCE_DIR}} -I ${wxWidgets_ROOT_DIR}/include
-i ${CMAKE_CURRENT_SOURCE_DIR}/kicad.rc -i ${CMAKE_CURRENT_SOURCE_DIR}/kicad.rc
-o ${CMAKE_CURRENT_BINARY_DIR}/kicad_rc.o) -o ${CMAKE_CURRENT_BINARY_DIR}/kicad_rc.o)
SET(KICAD_RESOURCES ${CMAKE_CURRENT_BINARY_DIR}/kicad_rc.o) SET(KICAD_RESOURCES ${CMAKE_CURRENT_BINARY_DIR}/kicad_rc.o)
ELSE(MINGW) ELSE(MINGW)
SET(KICAD_RESOURCES kicad.rc) SET(KICAD_RESOURCES kicad.rc)
ENDIF(MINGW) ENDIF(MINGW)
ENDIF(WIN32) ENDIF(WIN32)
IF(APPLE) IF(APPLE)
SET(KICAD_RESOURCES kicad.r) SET(KICAD_RESOURCES kicad.r)
ENDIF(APPLE) ENDIF(APPLE)
ADD_EXECUTABLE(kicad WIN32 MACOSX_BUNDLE ${KICAD_SRCS} ${KICAD_EXTRA_SRCS} ${KICAD_RESOURCES}) ADD_EXECUTABLE(kicad WIN32 MACOSX_BUNDLE ${KICAD_SRCS} ${KICAD_EXTRA_SRCS} ${KICAD_RESOURCES})
...@@ -36,5 +36,5 @@ TARGET_LINK_LIBRARIES(kicad common ${wxWidgets_LIBRARIES}) ...@@ -36,5 +36,5 @@ 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(KICAD_MINIZIP) IF(KICAD_MINIZIP)
ADD_SUBDIRECTORY(minizip) ADD_SUBDIRECTORY(minizip)
ENDIF(KICAD_MINIZIP) ENDIF(KICAD_MINIZIP)
FIND_PACKAGE(ZLIB) FIND_PACKAGE(ZLIB)
IF(ZLIB_FOUND) IF(ZLIB_FOUND)
MESSAGE(STATUS "Check for installed ZLIB -- found") MESSAGE(STATUS "Check for installed zlib -- found")
ELSE(ZLIB_FOUND) ELSE(ZLIB_FOUND)
MESSAGE(STATUS "Check for installed zlib -- not found") MESSAGE(STATUS "Check for installed zlib -- not found")
IF (NOT MINGW) IF(NOT MINGW)
MESSAGE(FATAL_ERROR MESSAGE(FATAL_ERROR
"zlib was not found - it is required to build KiCad") "zlib was not found - it is required to build KiCad")
ELSE (NOT MINGW) ELSE(NOT MINGW)
# zlib is not installed, and in this case wxWidgets creates its own zlib library # zlib is not installed, and in this case wxWidgets creates its own zlib library
# include files are in ${wxWidgets_ROOT_DIR}/src/zlib # include files are in ${wxWidgets_ROOT_DIR}/src/zlib
#and the corresponding library is libwxzlib-<version>.a ( like libwxzlib-2.8.a) # and the corresponding library is libwxzlib-<version>.a (like libwxzlib-2.8.a)
# and we try to use it # and we try to use it
INCLUDE_DIRECTORIES(${wxWidgets_ROOT_DIR}/src/zlib) INCLUDE_DIRECTORIES(${wxWidgets_ROOT_DIR}/src/zlib)
ENDIF (NOT MINGW) ENDIF(NOT MINGW)
ENDIF(ZLIB_FOUND) ENDIF(ZLIB_FOUND)
SET(MINIZIP_SRCS SET(MINIZIP_SRCS
ioapi.c ioapi.c
minizip.c minizip.c
zip.c) zip.c)
ADD_EXECUTABLE(minizip ${MINIZIP_SRCS} ) ADD_EXECUTABLE(minizip ${MINIZIP_SRCS})
TARGET_LINK_LIBRARIES(minizip ${ZLIB_LIBRARIES} ${wxWidgets_LIBRARIES}) TARGET_LINK_LIBRARIES(minizip ${ZLIB_LIBRARIES} ${wxWidgets_LIBRARIES})
INSTALL(TARGETS minizip RUNTIME DESTINATION bin COMPONENT binary) INSTALL(TARGETS minizip RUNTIME DESTINATION bin COMPONENT binary)
...@@ -9,4 +9,4 @@ INSTALL(FILES ${mdc_files} DESTINATION ${KICAD_MODULES} COMPONENT resources) ...@@ -9,4 +9,4 @@ INSTALL(FILES ${mdc_files} DESTINATION ${KICAD_MODULES} COMPONENT resources)
INSTALL(FILES ${mod_files} DESTINATION ${KICAD_MODULES} COMPONENT resources) INSTALL(FILES ${mod_files} DESTINATION ${KICAD_MODULES} COMPONENT resources)
INSTALL(DIRECTORY packages3d DESTINATION ${KICAD_MODULES} COMPONENT resources INSTALL(DIRECTORY packages3d DESTINATION ${KICAD_MODULES} COMPONENT resources
PATTERN ".svn" EXCLUDE) PATTERN ".svn" EXCLUDE)
ADD_DEFINITIONS(-DPCBNEW) ADD_DEFINITIONS(-DPCBNEW)
FIND_PACKAGE(Boost)
INCLUDE_DIRECTORIES( INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
${Boost_INCLUDE_DIR} ${Boost_INCLUDE_DIR}
...@@ -172,7 +170,7 @@ ADD_EXECUTABLE(dsntest EXCLUDE_FROM_ALL dsn.cpp) ...@@ -172,7 +170,7 @@ ADD_EXECUTABLE(dsntest EXCLUDE_FROM_ALL dsn.cpp)
TARGET_LINK_LIBRARIES(dsntest common ${wxWidgets_LIBRARIES}) TARGET_LINK_LIBRARIES(dsntest common ${wxWidgets_LIBRARIES})
# This one gets made only when testing. # This one gets made only when testing.
ADD_EXECUTABLE(specctra_test EXCLUDE_FROM_ALL specctra.cpp dsn.cpp ) 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})
......
SET(POLYGON_SRCS SET(POLYGON_SRCS
GenericPolygonClipperLibrary.cpp GenericPolygonClipperLibrary.cpp
math_for_graphics.cpp math_for_graphics.cpp
php_polygon.cpp php_polygon.cpp
php_polygon_vertex.cpp php_polygon_vertex.cpp
PolyLine.cpp) PolyLine.cpp)
ADD_LIBRARY(polygon ${POLYGON_SRCS}) ADD_LIBRARY(polygon ${POLYGON_SRCS})
INSTALL(FILES kicad.pro INSTALL(FILES kicad.pro
DESTINATION ${KICAD_TEMPLATE} COMPONENT resources) DESTINATION ${KICAD_TEMPLATE} COMPONENT resources)
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