Small CMake cleanup.
This commit is contained in:
parent
f38bb9d854
commit
61ebbd58f8
101
CMakeLists.txt
101
CMakeLists.txt
|
@ -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,71 +24,70 @@ 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
|
||||
SET(CMAKE_INSTALL_PREFIX /usr/local)
|
||||
# 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.")
|
||||
SET(KICAD_DATA share/kicad CACHE PATH "Location of KiCad data files.")
|
||||
SET(KICAD_MODULES ${KICAD_DATA}/modules)
|
||||
SET(KICAD_LIBRARY ${KICAD_DATA}/library)
|
||||
SET(KICAD_INTERNAT ${KICAD_DATA}/internat)
|
||||
SET(KICAD_TEMPLATE ${KICAD_DATA}/template)
|
||||
ENDIF(APPLE)
|
||||
IF(APPLE)
|
||||
ELSE(APPLE)
|
||||
# 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.
|
||||
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.")
|
||||
SET(KICAD_DATA share/kicad CACHE PATH "Location of KiCad data files.")
|
||||
SET(KICAD_MODULES ${KICAD_DATA}/modules)
|
||||
SET(KICAD_LIBRARY ${KICAD_DATA}/library)
|
||||
SET(KICAD_INTERNAT ${KICAD_DATA}/internat)
|
||||
SET(KICAD_TEMPLATE ${KICAD_DATA}/template)
|
||||
ENDIF(APPLE)
|
||||
ENDIF(UNIX)
|
||||
|
||||
IF(WIN32)
|
||||
# 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
|
||||
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.")
|
||||
SET(KICAD_DATA share/kicad CACHE PATH "Location of KiCad data files.")
|
||||
SET(KICAD_MODULES ${KICAD_DATA}/modules)
|
||||
SET(KICAD_LIBRARY ${KICAD_DATA}/library)
|
||||
SET(KICAD_INTERNAT ${KICAD_DATA}/internat)
|
||||
SET(KICAD_TEMPLATE ${KICAD_DATA}/template)
|
||||
# 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.
|
||||
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.")
|
||||
SET(KICAD_DATA share/kicad CACHE PATH "Location of KiCad data files.")
|
||||
SET(KICAD_MODULES ${KICAD_DATA}/modules)
|
||||
SET(KICAD_LIBRARY ${KICAD_DATA}/library)
|
||||
SET(KICAD_INTERNAT ${KICAD_DATA}/internat)
|
||||
SET(KICAD_TEMPLATE ${KICAD_DATA}/template)
|
||||
ENDIF(WIN32)
|
||||
|
||||
# Did we find wxWidgets ? This condition will fail
|
||||
# for as long as the internal vars do not point to
|
||||
# the proper wxWidgets configuration.
|
||||
IF(wxWidgets_FOUND)
|
||||
MESSAGE(STATUS "Check for installed wxWidgets -- found")
|
||||
MESSAGE(STATUS "Check for installed wxWidgets -- found")
|
||||
|
||||
# Include wxWidgets macros.
|
||||
INCLUDE(${wxWidgets_USE_FILE})
|
||||
# Include wxWidgets macros.
|
||||
INCLUDE(${wxWidgets_USE_FILE})
|
||||
|
||||
# We define the include paths here.
|
||||
# Include dirs for wxWidgets was defined before.
|
||||
INCLUDE_DIRECTORIES(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/include
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/share)
|
||||
# We define the include paths here.
|
||||
# Include dirs for wxWidgets was defined before.
|
||||
INCLUDE_DIRECTORIES(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/include
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/share)
|
||||
|
||||
# CMake will look in these dirs for nested 'CMakeLists.txt' files
|
||||
ADD_SUBDIRECTORY(common)
|
||||
ADD_SUBDIRECTORY(3d-viewer)
|
||||
ADD_SUBDIRECTORY(cvpcb)
|
||||
ADD_SUBDIRECTORY(eeschema)
|
||||
ADD_SUBDIRECTORY(gerbview)
|
||||
ADD_SUBDIRECTORY(kicad)
|
||||
ADD_SUBDIRECTORY(pcbnew)
|
||||
# CMake will look in these dirs for nested 'CMakeLists.txt' files.
|
||||
ADD_SUBDIRECTORY(common)
|
||||
ADD_SUBDIRECTORY(3d-viewer)
|
||||
ADD_SUBDIRECTORY(cvpcb)
|
||||
ADD_SUBDIRECTORY(eeschema)
|
||||
ADD_SUBDIRECTORY(gerbview)
|
||||
ADD_SUBDIRECTORY(kicad)
|
||||
ADD_SUBDIRECTORY(pcbnew)
|
||||
ELSE(wxWidgets_FOUND)
|
||||
# For convenience. When we cannot continue, inform the user.
|
||||
MESSAGE(STATUS "Check for installed wxWidgets -- not found")
|
||||
MESSAGE(FATAL_ERROR "wxWidgets was not found - it is required to build KiCad")
|
||||
# For convenience. When we cannot continue, inform the user.
|
||||
MESSAGE(STATUS "Check for installed wxWidgets -- not 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)
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -4,12 +4,12 @@ FIND_PACKAGE(Boost)
|
|||
|
||||
INCLUDE_DIRECTORIES(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${Boost_INCLUDE_DIRS}
|
||||
${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,12 +68,12 @@ 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
|
||||
files.cpp
|
||||
filling_zone_algorithm.cpp
|
||||
filling_zone_algorithm.cpp
|
||||
find.cpp
|
||||
gendrill.cpp
|
||||
gen_modules_placefile.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
|
||||
|
@ -119,7 +120,7 @@ SET(PCBNEW_SRCS
|
|||
set_color.cpp
|
||||
set_grid.cpp
|
||||
solve.cpp
|
||||
# specctra.cpp
|
||||
# specctra.cpp
|
||||
surbrill.cpp
|
||||
swap_layers.cpp
|
||||
tool_modedit.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})
|
||||
|
|
Loading…
Reference in New Issue