Small CMake cleanup.

This commit is contained in:
f3nix 2007-12-25 20:48:58 +00:00
parent f38bb9d854
commit 61ebbd58f8
3 changed files with 71 additions and 77 deletions

View File

@ -1,5 +1,5 @@
# Our project is called 'kicad' this is how it will be called in
# visual studio, and in our makefiles.
# Our project is called 'kicad'.This is how it will be called in
# Visual Studio and in our makefiles.
PROJECT(kicad)
CMAKE_MINIMUM_REQUIRED(VERSION 2.4.6 FATAL_ERROR)
@ -7,11 +7,11 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.4.6 FATAL_ERROR)
# Uncomment this line if you want verbose build messages.
#SET(CMAKE_VERBOSE_MAKEFILE ON)
# Set default flags for Debug build
# Set default flags for Debug build.
SET(CMAKE_C_FLAGS_DEBUG "-Wall -g3 -ggdb3 -DDEBUG")
SET(CMAKE_CXX_FLAGS_DEBUG "-Wall -g3 -ggdb3 -DDEBUG")
# Set default flags for Release build
# Set default flags for Release build.
SET(CMAKE_C_FLAGS_RELEASE "-Wall -O2 -DNDEBUG")
SET(CMAKE_CXX_FLAGS_RELEASE "-Wall -O2 -DNDEBUG")
SET(CMAKE_EXE_LINKER_FLAGS_RELEASE "-s")
@ -24,13 +24,13 @@ SET(wxWidgets_USE_LIBS base core adv gl html net)
# We need the Find package for wxWidgets to work.
FIND_PACKAGE(wxWidgets REQUIRED)
# Locations for install targets
# Locations for install targets.
IF(UNIX)
IF(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)
# 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_PLUGINS lib/kicad/plugins CACHE PATH "Location of KiCad plugins.")
SET(KICAD_DOCS share/doc/kicad CACHE PATH "Location of KiCad documentation files.")
@ -43,9 +43,9 @@ IF(UNIX)
ENDIF(UNIX)
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)
# 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_PLUGINS lib/kicad/plugins CACHE PATH "Location of KiCad plugins.")
SET(KICAD_DOCS share/doc/kicad CACHE PATH "Location of KiCad documentation files.")
@ -71,7 +71,7 @@ IF(wxWidgets_FOUND)
${CMAKE_CURRENT_SOURCE_DIR}/include
${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.
ADD_SUBDIRECTORY(common)
ADD_SUBDIRECTORY(3d-viewer)
ADD_SUBDIRECTORY(cvpcb)
@ -85,10 +85,9 @@ ELSE(wxWidgets_FOUND)
MESSAGE(FATAL_ERROR "wxWidgets was not found - it is required to build KiCad")
ENDIF(wxWidgets_FOUND)
# CMake will look at this dirs for nested 'CMakeLists.txt' files
# CMake will look at this dirs for nested 'CMakeLists.txt' files.
ADD_SUBDIRECTORY(internat)
ADD_SUBDIRECTORY(help)
ADD_SUBDIRECTORY(library)
ADD_SUBDIRECTORY(modules)
ADD_SUBDIRECTORY(template)

View File

@ -46,7 +46,6 @@ SET(EESCHEMA_SRCS
eeload.cpp
eeredraw.cpp
eeschema.cpp
# eestatus.cpp
eestring.cpp
erc.cpp
files-io.cpp
@ -103,10 +102,6 @@ SET(EESCHEMA_EXTRA_SRCS
../share/svg_print.cpp
../share/wxprint.cpp
../share/zoom.cpp
# ../share/buildmnu.cpp
# ../share/mdiframe.cpp
# ../share/treeprj.cpp
)
IF(WIN32)

View File

@ -7,9 +7,9 @@ INCLUDE_DIRECTORIES(
${Boost_INCLUDE_DIRS}
bitmaps
../3d-viewer
../polygon
)
../polygon)
# Many of the commented out ones are nested in *.cpp files for dialogs
SET(PCBNEW_SRCS
affiche.cpp
attribut.cpp
@ -36,7 +36,6 @@ SET(PCBNEW_SRCS
class_track.cpp
class_zone.cpp
clean.cpp
# many of the commented out ones are nested in *.cpp files for dialogs
# cleaningoptions_dialog.cpp
collectors.cpp
connect.cpp
@ -56,10 +55,12 @@ SET(PCBNEW_SRCS
# dialog_pad_edit.cpp
dialog_setup_libs.cpp
# dialog_track_options.cpp
# dialog_zones_by_polygon.cpp
dist.cpp
# docedit.cpp
# docedit.cpp <-- not used
dragsegm.cpp
drc.cpp
# dsn.cpp
edgemod.cpp
edit.cpp
editedge.cpp
@ -67,7 +68,7 @@ SET(PCBNEW_SRCS
editpads.cpp
editrack.cpp
editrack-part2.cpp
# editrout.cpp
# editrout.cpp <-- not used
edit_track_width.cpp
edtxtmod.cpp
export_gencad.cpp
@ -94,7 +95,7 @@ SET(PCBNEW_SRCS
modedit_undo_redo.cpp
moduleframe.cpp
modules.cpp
# move_copy_track.cpp
# move_copy_track.cpp <-- not used
move-drag_pads.cpp
move_or_drag_track.cpp
muonde.cpp
@ -135,18 +136,17 @@ SET(PCBNEW_SRCS
work.cpp
xchgmod.cpp
# zones.cpp
zones_by_polygon.cpp
)
zones_by_polygon.cpp)
SET(PCBNEW_EXTRA_SRCS
# ../polygon/PolyLine.cpp
../share/drawframe.cpp
../share/drawpanel.cpp
../share/infospgm.cpp
../share/setpage.cpp
../share/wxprint.cpp
../share/zoom.cpp
# ../polygon/PolyLine.cpp
)
../share/zoom.cpp)
IF(WIN32)
SET(PCBNEW_RESOURCES pcbnew.rc)
@ -157,14 +157,14 @@ ENDIF(APPLE)
ADD_EXECUTABLE(pcbnew WIN32 MACOSX_BUNDLE ${PCBNEW_SRCS} ${PCBNEW_EXTRA_SRCS} ${PCBNEW_RESOURCES})
# This one gets made only when testing
SET_SOURCE_FILES_PROPERTIES( dsn.cpp PROPERTIES COMPILE_FLAGS -DSTANDALONE )
ADD_EXECUTABLE( dsntest EXCLUDE_FROM_ALL dsn.cpp )
TARGET_LINK_LIBRARIES( dsntest common ${wxWidgets_LIBRARIES} )
# This one gets made only when testing.
SET_SOURCE_FILES_PROPERTIES(dsn.cpp PROPERTIES COMPILE_FLAGS -DSTANDALONE)
ADD_EXECUTABLE(dsntest EXCLUDE_FROM_ALL dsn.cpp)
TARGET_LINK_LIBRARIES(dsntest common ${wxWidgets_LIBRARIES})
SET_SOURCE_FILES_PROPERTIES( specctra.cpp PROPERTIES COMPILE_FLAGS -DSTANDALONE )
ADD_EXECUTABLE( specctra_test EXCLUDE_FROM_ALL specctra.cpp )
TARGET_LINK_LIBRARIES( specctra_test common ${wxWidgets_LIBRARIES} )
SET_SOURCE_FILES_PROPERTIES(specctra.cpp PROPERTIES COMPILE_FLAGS -DSTANDALONE)
ADD_EXECUTABLE(specctra_test EXCLUDE_FROM_ALL specctra.cpp)
TARGET_LINK_LIBRARIES(specctra_test common ${wxWidgets_LIBRARIES})
TARGET_LINK_LIBRARIES(pcbnew common 3d-viewer ${wxWidgets_LIBRARIES})