Reworked on CMakeLists for better OS X compatibility and moved toolbars to wineda_toolbar

This commit is contained in:
Jerry Jacobs 2010-05-16 21:51:58 +02:00
commit 6fba09e1bc
12 changed files with 135 additions and 72 deletions

View File

@ -49,7 +49,7 @@ set(COMMON_SRCS
richio.cpp
selcolor.cpp
string.cpp
toolbars.cpp
wineda_toolbar.cpp
trigo.cpp
worksheet.cpp
wxwineda.cpp

View File

@ -13,7 +13,7 @@
WinEDA_Toolbar::WinEDA_Toolbar( id_toolbar type, wxWindow * parent,
wxWindowID id, bool horizontal ):
wxAuiToolBar( parent, id, wxDefaultPosition, wxDefaultSize,
wxAUI_TB_DEFAULT_STYLE | ( ( horizontal ) ?
wxAUI_TB_DEFAULT_STYLE | wxAUI_TB_OVERFLOW | ( ( horizontal ) ?
wxAUI_TB_HORZ_LAYOUT :
wxAUI_TB_VERTICAL ) )
{

View File

@ -1,28 +1,25 @@
add_definitions(-DCVPCB)
###
# Includes
###
include_directories(${CMAKE_CURRENT_SOURCE_DIR}
${Boost_INCLUDE_DIR}
../3d-viewer
../pcbnew
../polygon
${CMAKE_SOURCE_DIR}/common)
##
# Name of target on OSX is also the title of the application
# on other targets this should be as normal
##
if(APPLE)
set(CVPCB_NAME CvPCB)
else(APPLE)
set(CVPCB_NAME cvpcb)
endif(APPLE)
###
# Sources
###
set(CVPCB_SRCS
autosel.cpp
cfg.cpp
class_cvpcb.cpp
class_components_listbox.cpp
class_components_listbox.cpp
class_DisplayFootprintsFrame.cpp
class_footprints_listbox.cpp
class_footprints_listbox.cpp
cvframe.cpp
cvpcb.cpp
dialog_cvpcb_config.cpp
@ -42,6 +39,9 @@ set(CVPCB_SRCS
tool_cvpcb.cpp
writenetlistpcbnew.cpp)
###
# Windows resource file
###
if(WIN32)
if(MINGW)
# CVPCB_RESOURCES variable is set by the macro.
@ -52,7 +52,7 @@ if(WIN32)
endif(WIN32)
###
# CvPCB.app resources
# Apple resource files
###
if(APPLE)
set(CVPCB_RESOURCES cvpcb.icns cvpcb_doc.icns)
@ -64,18 +64,31 @@ if(APPLE)
set(MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.cvpcb)
endif(APPLE)
add_executable(${CVPCB_NAME} WIN32 MACOSX_BUNDLE ${CVPCB_SRCS} ${CVPCB_RESOURCES})
###
# Create the cvpcb executable
###
add_executable(cvpcb WIN32 MACOSX_BUNDLE
${CVPCB_SRCS}
${CVPCB_RESOURCES})
###
# CvPCB.app creation
# Set properties for APPLE on cvpcb target
###
if(APPLE)
set_target_properties(${CVPCB_NAME} PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist)
set_target_properties(cvpcb PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist)
endif(APPLE)
target_link_libraries(${CVPCB_NAME} 3d-viewer common pcbcommon polygon bitmaps kbool
${OPENGL_LIBRARIES} ${wxWidgets_LIBRARIES} ${GDI_PLUS_LIBRARIES})
install(TARGETS ${CVPCB_NAME}
###
# Link executable target cvpcb with correct libraries
###
target_link_libraries(cvpcb 3d-viewer common pcbcommon polygon bitmaps kbool
${OPENGL_LIBRARIES}
${wxWidgets_LIBRARIES}
${GDI_PLUS_LIBRARIES}
)
###
# Add cvpcb as install target
###
install(TARGETS cvpcb
DESTINATION ${KICAD_BIN}
COMPONENT binary)

View File

@ -10,6 +10,7 @@
<key>CFBundleTypeExtensions</key>
<array>
<string>net</string>
<string>cmp</string>
</array>
<key>CFBundleTypeName</key>
<string>cvpcb document</string>

BIN
eeschema/eeschema_doc.icns Normal file

Binary file not shown.

Binary file not shown.

View File

@ -1,21 +1,17 @@
add_definitions(-DGERBVIEW -DPCBNEW)
###
# Includes
###
include_directories(${CMAKE_CURRENT_SOURCE_DIR}
${Boost_INCLUDE_DIR}
../3d-viewer
../cvpcb
../pcbnew
../polygon)
##
# Name of target on OSX is also the title of the application
# on other targets this should be as normal
##
if(APPLE)
set(GERBVIEW_NAME GerbView)
else(APPLE)
set(GERBVIEW_NAME gerbview)
endif(APPLE)
###
# Sources
###
set(GERBVIEW_SRCS
block.cpp
class_gerbview_layer_widget.cpp
@ -23,7 +19,7 @@ set(GERBVIEW_SRCS
dcode.cpp
deltrack.cpp
dialog_print_using_printer.cpp
dialog_print_using_printer_base.cpp
dialog_print_using_printer_base.cpp
dummy_functions.cpp
edit.cpp
export_to_pcbnew.cpp
@ -48,11 +44,17 @@ set(GERBVIEW_SRCS
tool_gerber.cpp
tracepcb.cpp )
###
# We need some extra sources from pcbnew
###
set(GERBVIEW_EXTRA_SRCS
../pcbnew/layer_widget.cpp
../pcbnew/printout_controler.cpp
)
###
# Windows resource file
###
if(WIN32)
if(MINGW)
# GERBVIEW_RESOURCES variable is set by the macro.
@ -62,6 +64,9 @@ if(WIN32)
endif(MINGW)
endif(WIN32)
###
# Apple resource files
###
if(APPLE)
set(GERBVIEW_RESOURCES gerbview.icns gerbview_doc.icns)
set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/gerbview.icns"
@ -72,15 +77,32 @@ if(APPLE)
set(MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.gerbview)
endif(APPLE)
add_executable(${GERBVIEW_NAME} WIN32 MACOSX_BUNDLE ${GERBVIEW_SRCS} ${GERBVIEW_EXTRA_SRCS} ${GERBVIEW_RESOURCES})
###
# Create the gerbview executable
###
add_executable(gerbview WIN32 MACOSX_BUNDLE
${GERBVIEW_SRCS}
${GERBVIEW_EXTRA_SRCS}
${GERBVIEW_RESOURCES})
###
# Set properties for APPLE on gerbview target
###
if(APPLE)
set_target_properties(${GERBVIEW_NAME} PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist)
set_target_properties(gerbview PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist)
endif(APPLE)
target_link_libraries(${GERBVIEW_NAME} common pcbcommon 3d-viewer polygon bitmaps kbool
${OPENGL_LIBRARIES} ${wxWidgets_LIBRARIES} ${GDI_PLUS_LIBRARIES})
###
# Link executable target gerbview with correct libraries
###
target_link_libraries(gerbview common pcbcommon 3d-viewer polygon bitmaps kbool
${OPENGL_LIBRARIES}
${wxWidgets_LIBRARIES}
${GDI_PLUS_LIBRARIES})
install(TARGETS ${GERBVIEW_NAME}
###
# Add gerbview as install target
###
install(TARGETS gerbview
DESTINATION ${KICAD_BIN}
COMPONENT binary)

View File

@ -36,24 +36,22 @@ if(APPLE)
set(MACOSX_BUNDLE_NAME kicad)
endif(APPLE)
if(APPLE)
add_executable(KiCad MACOSX_BUNDLE ${KICAD_SRCS} ${KICAD_EXTRA_SRCS} ${KICAD_RESOURCES})
else(APPLE)
add_executable(kicad WIN32 ${KICAD_SRCS} ${KICAD_EXTRA_SRCS} ${KICAD_RESOURCES})
endif(APPLE)
add_executable(kicad WIN32 MACOSX_BUNDLE
${KICAD_SRCS}
${KICAD_EXTRA_SRCS}
${KICAD_RESOURCES}
)
if(APPLE)
set_target_properties(KiCad PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist)
target_link_libraries(KiCad common bitmaps ${wxWidgets_LIBRARIES})
install(TARGETS KiCad
DESTINATION ${KICAD_BIN}
COMPONENT binary)
set_target_properties(kicad PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist)
target_link_libraries(kicad common bitmaps ${wxWidgets_LIBRARIES})
else(APPLE)
target_link_libraries(kicad common bitmaps kbool polygon ${wxWidgets_LIBRARIES} ${GDI_PLUS_LIBRARIES})
install(TARGETS kicad
endif(APPLE)
install(TARGETS kicad
DESTINATION ${KICAD_BIN}
COMPONENT binary)
endif(APPLE)
if(KICAD_MINIZIP)
add_subdirectory(minizip)

View File

@ -7,7 +7,11 @@
<dict>
<key>CFBundleTypeIconFile</key>
<string>kicad_doc.icns</string>
<key>CFBundleTypeName</key>
<key>CFBundleTypeExtensions</key>
<array>
<string>pro</string>
</array>
<key>CFBundleTypeName</key>
<string>kicad project files</string>
<key>LSHandlerRank</key>
<string>Owner</string>

View File

@ -7,7 +7,7 @@
# Original credits by Adium developers !
# http://www.adium.im
###########
VERSION=20100118
VERSION=`date +%Y%m%d`
###########
# Variables
@ -21,7 +21,10 @@ RELEASE_NAME=kicad-$(VERSION)
# Targets
###########
all:
echo "Copying application bundles"
mkdir release
cp -R ../../../*/*.app release
echo "Building kicad-${VERSION}.dmg"
rm -rfv build
mkdir build
@ -32,6 +35,6 @@ all:
mkdir -p $(BUILD_DIR)/.background
./make-diskimage.sh $(BUILD_DIR)/$(RELEASE_NAME).dmg $(KICAD_DIR) "KiCad $(VERSION)" dmg_kicad.scpt $(ART_DIR)
./make-diskimage.sh $(BUILD_DIR)/$(RELEASE_NAME).dmg $(KICAD_DIR) "KiCad" dmg_kicad.scpt $(ART_DIR)
@echo Build finished. `md5 $(BUILD_DIR)/$(RELEASE_NAME).dmg`
@echo "Build finished. `md5 $(BUILD_DIR)/$(RELEASE_NAME).dmg`"

View File

@ -1,20 +1,18 @@
add_definitions(-DPCBNEW)
###
# Includes
###
include_directories(${CMAKE_CURRENT_SOURCE_DIR}
${Boost_INCLUDE_DIR}
../3d-viewer
../polygon)
##
# Name of target on OSX is also the title of the application
# on other targets this should be as normal
##
if(APPLE)
set(PCBNEW_NAME PCBNew)
else(APPLE)
set(PCBNEW_NAME pcbnew)
endif(APPLE)
# Many of the commented out ones are nested in *.cpp files for dialogs
###
# Sources
#
# NOTE: Many of the commented out ones are nested in *.cpp files for dialogs
###
set(PCBNEW_SRCS
pcbframe.cpp
attribut.cpp
@ -176,10 +174,16 @@ set(PCBNEW_SRCS
zones_test_and_combine_areas.cpp
)
###
# We need some extra sources from common
###
set(PCBNEW_EXTRA_SRCS
../common/dialog_page_settings.cpp
)
###
# Windows resource file
###
if(WIN32)
if(MINGW)
# PCBNEW_RESOURCES variable is set by the macro.
@ -189,6 +193,9 @@ if(WIN32)
endif(MINGW)
endif(WIN32)
###
# Set properties for APPLE on pcbnew target
###
if(APPLE)
set(PCBNEW_RESOURCES pcbnew.icns pcbnew_doc.icns)
set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/pcbnew.icns"
@ -217,19 +224,34 @@ set_source_files_properties( dialog_freeroute_exchange.cpp
OBJECT_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/dialog_freeroute_exchange_help_html.h
)
add_executable(${PCBNEW_NAME} WIN32 MACOSX_BUNDLE ${PCBNEW_SRCS}
${PCBNEW_EXTRA_SRCS}
${PCBNEW_RESOURCES}
)
###
# Create the pcbnew executable
###
add_executable(pcbnew WIN32 MACOSX_BUNDLE
${PCBNEW_SRCS}
${PCBNEW_EXTRA_SRCS}
${PCBNEW_RESOURCES}
)
###
# Set properties for APPLE on pcbnew target
###
if(APPLE)
set_target_properties(${PCBNEW_NAME} PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist)
set_target_properties(pcbnew PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist)
endif(APPLE)
target_link_libraries(${PCBNEW_NAME} 3d-viewer common pcbcommon polygon bitmaps kbool
${OPENGL_LIBRARIES} ${wxWidgets_LIBRARIES} ${GDI_PLUS_LIBRARIES})
###
# Link executable target pcbnew with correct libraries
###
target_link_libraries(pcbnew 3d-viewer common pcbcommon polygon bitmaps kbool
${OPENGL_LIBRARIES}
${wxWidgets_LIBRARIES}
${GDI_PLUS_LIBRARIES})
install(TARGETS ${PCBNEW_NAME}
###
# Add pcbnew as install target
###
install(TARGETS pcbnew
DESTINATION ${KICAD_BIN}
COMPONENT binary)