Commit 9307b49e authored by f3nix's avatar f3nix
Browse files

CMake build system for all apps. Usage in install.txt

parent dbcb9ca0
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
ADD_DEFINITIONS(-DPCBNEW)

INCLUDE_DIRECTORIES(../pcbnew)

SET(3D-VIEWER_SRCS
	3d_aux.cpp
	3d_canvas.cpp
	3d_class.cpp
	3d_draw.cpp
	3d_frame.cpp
	3d_read_mesh.cpp
	3d_toolbar.cpp
	trackball.cpp)

ADD_LIBRARY(3d-viewer ${3D-VIEWER_SRCS})

CMake.TODO

0 → 100644
+7 −0
Original line number Diff line number Diff line
TODO:
* Fix kicad/minizip.
* Fix eeschema/plugins.
* Add install targets for binaries, docs, translations, libraries.
* Add DEBUG target.
* Testing under Windows and Mac.
* More testing ...
+19 −58
Original line number Diff line number Diff line
##---------------------------------------------------------------------------
## $RCSfile: CMakeLists.txt $
## $Source: CMakeLists.txt $
## $Revision: 1.48 $
## $Date: Feb 26, 2006 10:39:43 PM $
##---------------------------------------------------------------------------
## Author:      Jorgen Bodde
## Copyright:   (c) Jorgen Bodde
## License:     wxWidgets License
##---------------------------------------------------------------------------
 
##---------------------------------------------------
## Please set your wxWidgets configuration here
##--------------------------------------------------- 
 
SET(CMAKE_FIND_LIBRARY_PREFIXES "")
SET(CMAKE_FIND_LIBRARY_SUFFIXES ".lib")
 
# 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
SET(wxWidgets_USE_LIBS base core gl net)
 
# We need the Find package for wxWidgets to work
FIND_PACKAGE(wxWidgets)
 
##---------------------------------------------------
## Actual config file starts here
##--------------------------------------------------- 
 
# Did we find wxWidgets ? This condition will fail
# for as long as the internal vars do not point to
# the proper wxWidgets configuration
PROJECT(kicad)

CMAKE_MINIMUM_REQUIRED(VERSION 2.4.7 FATAL_ERROR)

#SET(CMAKE_VERBOSE_MAKEFILE ON)

SET(wxWidgets_USE_LIBS base core adv gl html net)

FIND_PACKAGE(wxWidgets REQUIRED)

IF(wxWidgets_FOUND)
	MESSAGE("-- wxWidgets found")
	
    # Include wxWidgets macros
	INCLUDE(${wxWidgets_USE_FILE})

    # Our project is called 'minimal' this is how it will be called in
    # visual studio, and in our makefiles. 
    PROJECT (KICAD_EDA)

    # We define the include paths here, our minimal source dir is one, 
    # and also the include dirs defined by wxWidgets
	INCLUDE_DIRECTORIES(
                        ${CMAKE_BINARY_DIR}
                        ${CMAKE_SOURCE_DIR}
                        ${CMAKE_SOURCE_DIR}/include
                        ${CMAKE_SOURCE_DIR}/common
                        ${CMAKE_SOURCE_DIR}/kicad/bitmaps
                        ${CMAKE_SOURCE_DIR}/common/bitmaps
                        ${wxWidgets_INCLUDE_DIRS}
                       )
		${CMAKE_CURRENT_SOURCE_DIR}/include
		${CMAKE_CURRENT_SOURCE_DIR}/share)

	SUBDIRS(common 3d-viewer cvpcb eeschema gerbview kicad pcbnew)
ELSE(wxWidgets_FOUND)
    # For convenience. When we cannot continue, inform the user
    MESSAGE("wxWidgets not found!")
	MESSAGE("wxWidgets is required to build KiCad!")
ENDIF(wxWidgets_FOUND)

add_subdirectory (common)
add_subdirectory (kicad)
+37 −51
Original line number Diff line number Diff line
# We define the include paths here, our minimal source dir is one, 
# and also the include dirs defined by wxWidgets
#INCLUDE_DIRECTORIES()
INCLUDE_DIRECTORIES(bitmaps)

# For convenience we define the sources as a variable. You can add 
# header files and cpp / c files and CMake will sort them out
SET(SRCS    	confirm
		base_struct
		copy_to_clipboard
		basicframe
		common_plot_functions
		common_plotPS_functions
		common_plotHPGL_functions
		hotkeys_basic
		drawtxt
		wxwineda
		string
		gr_basic
		gestfich
		trigo
		selcolor
		bitmaps
		common
		eda_doc
		toolbars
		displlst
		edaappl
		block_commande
		msgpanel
		projet_config
		get_component_dialog
		eda_dde
		worksheet
		base_screen
		dcsvg
   )
SET(COMMON_SRCS
	base_screen.cpp
	base_struct.cpp
	basicframe.cpp
	bitmaps.cpp
	block_commande.cpp
	common.cpp
	common_plot_functions.cpp
	common_plotHPGL_functions.cpp
	common_plotPS_functions.cpp
	confirm.cpp
	copy_to_clipboard.cpp
	dcsvg.cpp
	displlst.cpp
	drawtxt.cpp
	edaappl.cpp
	eda_dde.cpp
	eda_doc.cpp
#	edamenu.cpp
	gestfich.cpp
	get_component_dialog.cpp
	gr_basic.cpp
	hotkeys_basic.cpp
	msgpanel.cpp
	projet_config.cpp
#	pyhandler.cpp
	selcolor.cpp
	string.cpp
	toolbars.cpp
	trigo.cpp
	worksheet.cpp
	wxwineda.cpp)

# If we build for windows systems, we also include the resource file
# containing the manifest, icon and other resources
#IF(WIN32)
#  SET(SRCS ${SRCS} kicad.rc)
#ENDIF(WIN32)

# Here we define the executable kicad.exe or kicad on other systems
# the above paths and defines will be used in this build
ADD_LIBRARY(common ${SRCS})
    
# We add to our target 'kicad' the wxWidgets libraries. These are
# set for us by the find script. If you need other libraries, you
# can add them here as well. 
#TARGET_LINK_LIBRARIES(kicad ${wxWidgets_LIBRARIES} )
ADD_LIBRARY(common ${COMMON_SRCS})

cvpcb/CMakeLists.txt

0 → 100644
+68 −0
Original line number Diff line number Diff line
ADD_DEFINITIONS(-DCVPCB)

INCLUDE_DIRECTORIES(
	${CMAKE_CURRENT_SOURCE_DIR}
	bitmaps
	../3d-viewer
	../pcbnew)

SET(CVPCB_SRCS
	autosel.cpp
	cfg.cpp
	class_cvpcb.cpp
	cvframe.cpp
	cvpcb.cpp
#	dialog_cvpcb_config.cpp
	dialog_display_options.cpp
	displayframe.cpp
	genequiv.cpp
#	genorcad.cpp
	init.cpp
	listboxes.cpp
	listlib.cpp
	loadcmp.cpp
	memoire.cpp
	menucfg.cpp
	rdpcad.cpp
	readschematicnetlist.cpp
	savecmp.cpp
	setvisu.cpp
	tool_cvpcb.cpp
	viewlnet.cpp
	viewlogi.cpp
	writenetlistpcbnew.cpp)

SET(CVPCB_EXTRA_SRCS
	../pcbnew/basepcbframe.cpp
	../pcbnew/class_board.cpp
	../pcbnew/class_cotation.cpp
	../pcbnew/class_edge_mod.cpp
	../pcbnew/class_equipot.cpp
	../pcbnew/class_mire.cpp
	../pcbnew/class_module.cpp
	../pcbnew/class_pad.cpp
	../pcbnew/class_pcb_text.cpp
	../pcbnew/class_text_mod.cpp
	../pcbnew/class_track.cpp
	../pcbnew/classpcb.cpp
	../pcbnew/collectors.cpp
	../pcbnew/ioascii.cpp
	../pcbnew/tracemod.cpp

	../share/drawframe.cpp
	../share/drawpanel.cpp
	../share/infospgm.cpp
	../share/zoom.cpp)

IF(WIN32)
	SET(CVPCB_RESOURCES cvpcb.rc)
ENDIF(WIN32)
IF(APPLE)
	SET(CVPCB_RESOURCES cvpcb.r)
ENDIF(APPLE)

ADD_EXECUTABLE(cvpcb WIN32 MACOSX_BUNDLE ${CVPCB_SRCS} ${CVPCB_EXTRA_SRCS} ${CVPCB_RESOURCES})

TARGET_LINK_LIBRARIES(cvpcb common 3d-viewer ${wxWidgets_LIBRARIES})

INSTALL(PROGRAMS cvpcb DESTINATION /bin)
Loading