Updates for OS X
This commit is contained in:
parent
6f3c444285
commit
d2994d586f
|
@ -1,21 +1,18 @@
|
||||||
add_definitions(-DCVPCB)
|
add_definitions(-DCVPCB)
|
||||||
|
|
||||||
|
###
|
||||||
|
# Includes
|
||||||
|
###
|
||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
${Boost_INCLUDE_DIR}
|
${Boost_INCLUDE_DIR}
|
||||||
../3d-viewer
|
../3d-viewer
|
||||||
../pcbnew
|
../pcbnew
|
||||||
../polygon
|
../polygon
|
||||||
${CMAKE_SOURCE_DIR}/common)
|
${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
|
set(CVPCB_SRCS
|
||||||
autosel.cpp
|
autosel.cpp
|
||||||
cfg.cpp
|
cfg.cpp
|
||||||
|
@ -42,6 +39,9 @@ set(CVPCB_SRCS
|
||||||
tool_cvpcb.cpp
|
tool_cvpcb.cpp
|
||||||
writenetlistpcbnew.cpp)
|
writenetlistpcbnew.cpp)
|
||||||
|
|
||||||
|
###
|
||||||
|
# Windows resource file
|
||||||
|
###
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
if(MINGW)
|
if(MINGW)
|
||||||
# CVPCB_RESOURCES variable is set by the macro.
|
# CVPCB_RESOURCES variable is set by the macro.
|
||||||
|
@ -52,7 +52,7 @@ if(WIN32)
|
||||||
endif(WIN32)
|
endif(WIN32)
|
||||||
|
|
||||||
###
|
###
|
||||||
# CvPCB.app resources
|
# Apple resource files
|
||||||
###
|
###
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
set(CVPCB_RESOURCES cvpcb.icns cvpcb_doc.icns)
|
set(CVPCB_RESOURCES cvpcb.icns cvpcb_doc.icns)
|
||||||
|
@ -64,18 +64,31 @@ if(APPLE)
|
||||||
set(MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.cvpcb)
|
set(MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.cvpcb)
|
||||||
endif(APPLE)
|
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)
|
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)
|
endif(APPLE)
|
||||||
|
|
||||||
target_link_libraries(${CVPCB_NAME} 3d-viewer common pcbcommon polygon bitmaps kbool
|
###
|
||||||
${OPENGL_LIBRARIES} ${wxWidgets_LIBRARIES} ${GDI_PLUS_LIBRARIES})
|
# Link executable target cvpcb with correct libraries
|
||||||
|
###
|
||||||
install(TARGETS ${CVPCB_NAME}
|
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}
|
DESTINATION ${KICAD_BIN}
|
||||||
COMPONENT binary)
|
COMPONENT binary)
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
<key>CFBundleTypeExtensions</key>
|
<key>CFBundleTypeExtensions</key>
|
||||||
<array>
|
<array>
|
||||||
<string>net</string>
|
<string>net</string>
|
||||||
|
<string>cmp</string>
|
||||||
</array>
|
</array>
|
||||||
<key>CFBundleTypeName</key>
|
<key>CFBundleTypeName</key>
|
||||||
<string>cvpcb document</string>
|
<string>cvpcb document</string>
|
||||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -1,21 +1,17 @@
|
||||||
add_definitions(-DGERBVIEW -DPCBNEW)
|
add_definitions(-DGERBVIEW -DPCBNEW)
|
||||||
|
|
||||||
|
###
|
||||||
|
# Includes
|
||||||
|
###
|
||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
${Boost_INCLUDE_DIR}
|
${Boost_INCLUDE_DIR}
|
||||||
../3d-viewer
|
../3d-viewer
|
||||||
../cvpcb
|
../cvpcb
|
||||||
../pcbnew
|
../pcbnew
|
||||||
../polygon)
|
../polygon)
|
||||||
##
|
###
|
||||||
# Name of target on OSX is also the title of the application
|
# Sources
|
||||||
# on other targets this should be as normal
|
###
|
||||||
##
|
|
||||||
if(APPLE)
|
|
||||||
set(GERBVIEW_NAME GerbView)
|
|
||||||
else(APPLE)
|
|
||||||
set(GERBVIEW_NAME gerbview)
|
|
||||||
endif(APPLE)
|
|
||||||
|
|
||||||
set(GERBVIEW_SRCS
|
set(GERBVIEW_SRCS
|
||||||
block.cpp
|
block.cpp
|
||||||
class_gerbview_layer_widget.cpp
|
class_gerbview_layer_widget.cpp
|
||||||
|
@ -48,11 +44,17 @@ set(GERBVIEW_SRCS
|
||||||
tool_gerber.cpp
|
tool_gerber.cpp
|
||||||
tracepcb.cpp )
|
tracepcb.cpp )
|
||||||
|
|
||||||
|
###
|
||||||
|
# We need some extra sources from pcbnew
|
||||||
|
###
|
||||||
set(GERBVIEW_EXTRA_SRCS
|
set(GERBVIEW_EXTRA_SRCS
|
||||||
../pcbnew/layer_widget.cpp
|
../pcbnew/layer_widget.cpp
|
||||||
../pcbnew/printout_controler.cpp
|
../pcbnew/printout_controler.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
###
|
||||||
|
# Windows resource file
|
||||||
|
###
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
if(MINGW)
|
if(MINGW)
|
||||||
# GERBVIEW_RESOURCES variable is set by the macro.
|
# GERBVIEW_RESOURCES variable is set by the macro.
|
||||||
|
@ -62,6 +64,9 @@ if(WIN32)
|
||||||
endif(MINGW)
|
endif(MINGW)
|
||||||
endif(WIN32)
|
endif(WIN32)
|
||||||
|
|
||||||
|
###
|
||||||
|
# Apple resource files
|
||||||
|
###
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
set(GERBVIEW_RESOURCES gerbview.icns gerbview_doc.icns)
|
set(GERBVIEW_RESOURCES gerbview.icns gerbview_doc.icns)
|
||||||
set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/gerbview.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)
|
set(MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.gerbview)
|
||||||
endif(APPLE)
|
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)
|
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)
|
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}
|
DESTINATION ${KICAD_BIN}
|
||||||
COMPONENT binary)
|
COMPONENT binary)
|
||||||
|
|
|
@ -36,24 +36,22 @@ if(APPLE)
|
||||||
set(MACOSX_BUNDLE_NAME kicad)
|
set(MACOSX_BUNDLE_NAME kicad)
|
||||||
endif(APPLE)
|
endif(APPLE)
|
||||||
|
|
||||||
if(APPLE)
|
add_executable(kicad WIN32 MACOSX_BUNDLE
|
||||||
add_executable(KiCad MACOSX_BUNDLE ${KICAD_SRCS} ${KICAD_EXTRA_SRCS} ${KICAD_RESOURCES})
|
${KICAD_SRCS}
|
||||||
else(APPLE)
|
${KICAD_EXTRA_SRCS}
|
||||||
add_executable(kicad WIN32 ${KICAD_SRCS} ${KICAD_EXTRA_SRCS} ${KICAD_RESOURCES})
|
${KICAD_RESOURCES}
|
||||||
endif(APPLE)
|
)
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
set_target_properties(KiCad PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist)
|
set_target_properties(kicad PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist)
|
||||||
target_link_libraries(KiCad common bitmaps ${wxWidgets_LIBRARIES})
|
target_link_libraries(kicad common bitmaps ${wxWidgets_LIBRARIES})
|
||||||
install(TARGETS KiCad
|
|
||||||
DESTINATION ${KICAD_BIN}
|
|
||||||
COMPONENT binary)
|
|
||||||
else(APPLE)
|
else(APPLE)
|
||||||
target_link_libraries(kicad common bitmaps kbool polygon ${wxWidgets_LIBRARIES} ${GDI_PLUS_LIBRARIES})
|
target_link_libraries(kicad common bitmaps kbool polygon ${wxWidgets_LIBRARIES} ${GDI_PLUS_LIBRARIES})
|
||||||
install(TARGETS kicad
|
endif(APPLE)
|
||||||
|
|
||||||
|
install(TARGETS kicad
|
||||||
DESTINATION ${KICAD_BIN}
|
DESTINATION ${KICAD_BIN}
|
||||||
COMPONENT binary)
|
COMPONENT binary)
|
||||||
endif(APPLE)
|
|
||||||
|
|
||||||
if(KICAD_MINIZIP)
|
if(KICAD_MINIZIP)
|
||||||
add_subdirectory(minizip)
|
add_subdirectory(minizip)
|
||||||
|
|
|
@ -7,6 +7,10 @@
|
||||||
<dict>
|
<dict>
|
||||||
<key>CFBundleTypeIconFile</key>
|
<key>CFBundleTypeIconFile</key>
|
||||||
<string>kicad_doc.icns</string>
|
<string>kicad_doc.icns</string>
|
||||||
|
<key>CFBundleTypeExtensions</key>
|
||||||
|
<array>
|
||||||
|
<string>pro</string>
|
||||||
|
</array>
|
||||||
<key>CFBundleTypeName</key>
|
<key>CFBundleTypeName</key>
|
||||||
<string>kicad project files</string>
|
<string>kicad project files</string>
|
||||||
<key>LSHandlerRank</key>
|
<key>LSHandlerRank</key>
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
# Original credits by Adium developers !
|
# Original credits by Adium developers !
|
||||||
# http://www.adium.im
|
# http://www.adium.im
|
||||||
###########
|
###########
|
||||||
VERSION=20100118
|
VERSION=`date +%Y%m%d`
|
||||||
|
|
||||||
###########
|
###########
|
||||||
# Variables
|
# Variables
|
||||||
|
@ -21,7 +21,10 @@ RELEASE_NAME=kicad-$(VERSION)
|
||||||
# Targets
|
# Targets
|
||||||
###########
|
###########
|
||||||
all:
|
all:
|
||||||
|
echo "Copying application bundles"
|
||||||
|
mkdir release
|
||||||
|
cp -R ../../../*/*.app release
|
||||||
|
echo "Building kicad-${VERSION}.dmg"
|
||||||
rm -rfv build
|
rm -rfv build
|
||||||
mkdir build
|
mkdir build
|
||||||
|
|
||||||
|
@ -32,6 +35,6 @@ all:
|
||||||
|
|
||||||
mkdir -p $(BUILD_DIR)/.background
|
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`"
|
||||||
|
|
Binary file not shown.
|
@ -1,20 +1,18 @@
|
||||||
add_definitions(-DPCBNEW)
|
add_definitions(-DPCBNEW)
|
||||||
|
|
||||||
|
###
|
||||||
|
# Includes
|
||||||
|
###
|
||||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
${Boost_INCLUDE_DIR}
|
${Boost_INCLUDE_DIR}
|
||||||
../3d-viewer
|
../3d-viewer
|
||||||
../polygon)
|
../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
|
set(PCBNEW_SRCS
|
||||||
pcbframe.cpp
|
pcbframe.cpp
|
||||||
attribut.cpp
|
attribut.cpp
|
||||||
|
@ -176,10 +174,16 @@ set(PCBNEW_SRCS
|
||||||
zones_test_and_combine_areas.cpp
|
zones_test_and_combine_areas.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
###
|
||||||
|
# We need some extra sources from common
|
||||||
|
###
|
||||||
set(PCBNEW_EXTRA_SRCS
|
set(PCBNEW_EXTRA_SRCS
|
||||||
../common/dialog_page_settings.cpp
|
../common/dialog_page_settings.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
###
|
||||||
|
# Windows resource file
|
||||||
|
###
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
if(MINGW)
|
if(MINGW)
|
||||||
# PCBNEW_RESOURCES variable is set by the macro.
|
# PCBNEW_RESOURCES variable is set by the macro.
|
||||||
|
@ -189,6 +193,9 @@ if(WIN32)
|
||||||
endif(MINGW)
|
endif(MINGW)
|
||||||
endif(WIN32)
|
endif(WIN32)
|
||||||
|
|
||||||
|
###
|
||||||
|
# Set properties for APPLE on pcbnew target
|
||||||
|
###
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
set(PCBNEW_RESOURCES pcbnew.icns pcbnew_doc.icns)
|
set(PCBNEW_RESOURCES pcbnew.icns pcbnew_doc.icns)
|
||||||
set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/pcbnew.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
|
OBJECT_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/dialog_freeroute_exchange_help_html.h
|
||||||
)
|
)
|
||||||
|
|
||||||
add_executable(${PCBNEW_NAME} WIN32 MACOSX_BUNDLE ${PCBNEW_SRCS}
|
###
|
||||||
|
# Create the pcbnew executable
|
||||||
|
###
|
||||||
|
add_executable(pcbnew WIN32 MACOSX_BUNDLE
|
||||||
|
${PCBNEW_SRCS}
|
||||||
${PCBNEW_EXTRA_SRCS}
|
${PCBNEW_EXTRA_SRCS}
|
||||||
${PCBNEW_RESOURCES}
|
${PCBNEW_RESOURCES}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
###
|
||||||
|
# Set properties for APPLE on pcbnew target
|
||||||
|
###
|
||||||
if(APPLE)
|
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)
|
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}
|
DESTINATION ${KICAD_BIN}
|
||||||
COMPONENT binary)
|
COMPONENT binary)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue