Commit d2994d58 authored by Jerry Jacobs's avatar Jerry Jacobs
Browse files

Updates for OS X

parent 6f3c4442
Loading
Loading
Loading
Loading
+32 −19
Original line number Diff line number Diff line
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
@@ -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)
+1 −0
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@
			<key>CFBundleTypeExtensions</key>
			<array>
				<string>net</string>
				<string>cmp</string>
			</array>
			<key>CFBundleTypeName</key>
			<string>cvpcb document</string>
+141 KiB

File added.

No diff preview for this file type.

eeschema/file_sch.icns

deleted100644 → 0
−51.7 KiB

File deleted.

+38 −16
Original line number Diff line number Diff line
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
@@ -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)
Loading