Commit c2d7a555 authored by kintel's avatar kintel

Mac OS X build system fixes

parent dd58ea1e
...@@ -29,15 +29,10 @@ endif(CMAKE_COMPILER_IS_GNUCXX) ...@@ -29,15 +29,10 @@ endif(CMAKE_COMPILER_IS_GNUCXX)
set(KICAD_BIN bin CACHE PATH "Location of KiCad binaries.") set(KICAD_BIN bin CACHE PATH "Location of KiCad binaries.")
if(UNIX) if(UNIX)
if(APPLE) # Everything without leading / is relative to CMAKE_INSTALL_PREFIX.
else(APPLE) set(KICAD_PLUGINS lib/kicad/plugins CACHE PATH "Location of KiCad plugins.")
# Like all variables, CMAKE_INSTALL_PREFIX can be over-ridden on the command line. set(KICAD_DATA share/kicad CACHE PATH "Location of KiCad data files.")
set(CMAKE_INSTALL_PREFIX /usr/local CACHE PATH "") set(KICAD_DOCS share/doc/kicad CACHE PATH "Location of KiCad documentation files.")
# Everything without leading / is relative to CMAKE_INSTALL_PREFIX.
set(KICAD_PLUGINS lib/kicad/plugins CACHE PATH "Location of KiCad plugins.")
set(KICAD_DATA share/kicad CACHE PATH "Location of KiCad data files.")
set(KICAD_DOCS share/doc/kicad CACHE PATH "Location of KiCad documentation files.")
endif(APPLE)
endif(UNIX) endif(UNIX)
if(WIN32) if(WIN32)
......
...@@ -65,12 +65,20 @@ if(WIN32) ...@@ -65,12 +65,20 @@ if(WIN32)
endif(MINGW) endif(MINGW)
endif(WIN32) endif(WIN32)
if(APPLE) if(APPLE)
set(CVPCB_RESOURCES cvpcb.r) set(CVPCB_RESOURCES cvpcb.icns)
set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/cvpcb.icns"
PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
set(MACOSX_BUNDLE_ICON_FILE cvpcb.icns)
set(MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.cvpcb)
set(MACOSX_BUNDLE_NAME cvpcb)
endif(APPLE) endif(APPLE)
add_executable(cvpcb WIN32 MACOSX_BUNDLE ${CVPCB_SRCS} ${CVPCB_EXTRA_SRCS} ${CVPCB_RESOURCES}) add_executable(cvpcb WIN32 MACOSX_BUNDLE ${CVPCB_SRCS} ${CVPCB_EXTRA_SRCS} ${CVPCB_RESOURCES})
target_link_libraries(cvpcb 3d-viewer common polygon kbool bitmaps ${wxWidgets_LIBRARIES} ${OPENGL_LIBRARIES}) target_link_libraries(cvpcb 3d-viewer common polygon kbool bitmaps ${wxWidgets_LIBRARIES} ${OPENGL_LIBRARIES})
install(TARGETS cvpcb RUNTIME DESTINATION ${KICAD_BIN} install(TARGETS cvpcb
COMPONENT binary) RUNTIME DESTINATION ${KICAD_BIN}
BUNDLE DESTINATION ${KICAD_BIN}
COMPONENT binary)
data 'vers' (2) {
$"0100 2000 0000 0531 2E30 6430 0531 2E30"
$"6430"} ;
data 'vers' (1) {
$"0100 2000 0000 0531 2E30 6430 0531 2E30"
$"6430"} ;
...@@ -111,14 +111,22 @@ if(WIN32) ...@@ -111,14 +111,22 @@ if(WIN32)
endif(MINGW) endif(MINGW)
endif(WIN32) endif(WIN32)
if(APPLE) if(APPLE)
set(EESCHEMA_RESOURCES eeschema.r) set(EESCHEMA_RESOURCES eeschema.icns)
set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/eeschema.icns"
PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
set(MACOSX_BUNDLE_ICON_FILE eeschema.icns)
set(MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.eeschema)
set(MACOSX_BUNDLE_NAME eeschema)
endif(APPLE) endif(APPLE)
add_executable(eeschema WIN32 MACOSX_BUNDLE ${EESCHEMA_SRCS} ${EESCHEMA_EXTRA_SRCS} ${EESCHEMA_RESOURCES}) add_executable(eeschema WIN32 MACOSX_BUNDLE ${EESCHEMA_SRCS} ${EESCHEMA_EXTRA_SRCS} ${EESCHEMA_RESOURCES})
target_link_libraries(eeschema common bitmaps ${wxWidgets_LIBRARIES}) target_link_libraries(eeschema common bitmaps ${wxWidgets_LIBRARIES})
install(TARGETS eeschema RUNTIME DESTINATION ${KICAD_BIN} install(TARGETS eeschema
COMPONENT binary) RUNTIME DESTINATION ${KICAD_BIN}
BUNDLE DESTINATION ${KICAD_BIN}
COMPONENT binary)
add_subdirectory(plugins) add_subdirectory(plugins)
data 'vers' (2) {
$"0100 2000 0000 0531 2E30 6430 0531 2E30"
$"6430"} ;
data 'vers' (1) {
$"0100 2000 0000 0531 2E30 6430 0531 2E30"
$"6430"} ;
...@@ -68,12 +68,20 @@ if(WIN32) ...@@ -68,12 +68,20 @@ if(WIN32)
endif(MINGW) endif(MINGW)
endif(WIN32) endif(WIN32)
if(APPLE) if(APPLE)
set(GERBVIEW_RESOURCES gerbview.r) set(GERBVIEW_RESOURCES gerbview.icns)
set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/gerbview.icns"
PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
set(MACOSX_BUNDLE_ICON_FILE gerbview.icns)
set(MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.gerbview)
set(MACOSX_BUNDLE_NAME gerbview)
endif(APPLE) endif(APPLE)
add_executable(gerbview WIN32 MACOSX_BUNDLE ${GERBVIEW_SRCS} ${GERBVIEW_EXTRA_SRCS} ${GERBVIEW_RESOURCES}) add_executable(gerbview WIN32 MACOSX_BUNDLE ${GERBVIEW_SRCS} ${GERBVIEW_EXTRA_SRCS} ${GERBVIEW_RESOURCES})
target_link_libraries(gerbview 3d-viewer common polygon kbool bitmaps ${wxWidgets_LIBRARIES}) target_link_libraries(gerbview 3d-viewer common polygon kbool bitmaps ${wxWidgets_LIBRARIES})
install(TARGETS gerbview RUNTIME DESTINATION ${KICAD_BIN} install(TARGETS gerbview
COMPONENT binary) RUNTIME DESTINATION ${KICAD_BIN}
BUNDLE DESTINATION ${KICAD_BIN}
COMPONENT binary)
data 'vers' (2) {
$"0100 2000 0000 0531 2E30 6430 0531 2E30"
$"6430"} ;
data 'vers' (1) {
$"0100 2000 0000 0531 2E30 6430 0531 2E30"
$"6430"} ;
...@@ -20,15 +20,24 @@ if(WIN32) ...@@ -20,15 +20,24 @@ if(WIN32)
endif(MINGW) endif(MINGW)
endif(WIN32) endif(WIN32)
if(APPLE) if(APPLE)
set(KICAD_RESOURCES kicad.r) set(KICAD_RESOURCES kicad.icns)
set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/kicad.icns"
PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
set(MACOSX_BUNDLE_ICON_FILE kicad.icns)
set(MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.kicad)
set(MACOSX_BUNDLE_NAME kicad)
endif(APPLE) endif(APPLE)
add_executable(kicad WIN32 MACOSX_BUNDLE ${KICAD_SRCS} ${KICAD_EXTRA_SRCS} ${KICAD_RESOURCES}) add_executable(kicad WIN32 MACOSX_BUNDLE
${KICAD_SRCS} ${KICAD_EXTRA_SRCS} ${KICAD_RESOURCES})
target_link_libraries(kicad common bitmaps ${wxWidgets_LIBRARIES}) target_link_libraries(kicad common bitmaps ${wxWidgets_LIBRARIES})
install(TARGETS kicad RUNTIME DESTINATION ${KICAD_BIN} install(TARGETS kicad
COMPONENT binary) RUNTIME DESTINATION ${KICAD_BIN}
BUNDLE DESTINATION ${KICAD_BIN}
COMPONENT binary)
if(KICAD_MINIZIP) if(KICAD_MINIZIP)
add_subdirectory(minizip) add_subdirectory(minizip)
......
data 'vers' (2) {
$"0100 2000 0000 0531 2E30 6430 0531 2E30"
$"6430"} ;
data 'vers' (1) {
$"0100 2000 0000 0531 2E30 6430 0531 2E30"
$"6430"} ;
...@@ -157,15 +157,23 @@ if(WIN32) ...@@ -157,15 +157,23 @@ if(WIN32)
endif(MINGW) endif(MINGW)
endif(WIN32) endif(WIN32)
if(APPLE) if(APPLE)
set(PCBNEW_RESOURCES pcbnew.r) set(PCBNEW_RESOURCES pcbnew.icns)
set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/pcbnew.icns"
PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
set(MACOSX_BUNDLE_ICON_FILE pcbnew.icns)
set(MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.pcbnew)
set(MACOSX_BUNDLE_NAME pcbnew)
endif(APPLE) endif(APPLE)
add_executable(pcbnew WIN32 MACOSX_BUNDLE ${PCBNEW_SRCS} ${PCBNEW_EXTRA_SRCS} ${PCBNEW_RESOURCES}) add_executable(pcbnew WIN32 MACOSX_BUNDLE ${PCBNEW_SRCS} ${PCBNEW_EXTRA_SRCS} ${PCBNEW_RESOURCES})
target_link_libraries(pcbnew 3d-viewer common polygon kbool bitmaps ${wxWidgets_LIBRARIES} ${OPENGL_LIBRARIES}) target_link_libraries(pcbnew 3d-viewer common polygon kbool bitmaps ${wxWidgets_LIBRARIES} ${OPENGL_LIBRARIES})
install(TARGETS pcbnew RUNTIME DESTINATION ${KICAD_BIN} install(TARGETS pcbnew
COMPONENT binary) RUNTIME DESTINATION ${KICAD_BIN}
BUNDLE DESTINATION ${KICAD_BIN}
COMPONENT binary)
# This one gets made only when testing. # This one gets made only when testing.
......
...@@ -4,7 +4,7 @@ EXTRALIBS = ../common/common.a ../bitmaps/libbitmaps.a\ ...@@ -4,7 +4,7 @@ EXTRALIBS = ../common/common.a ../bitmaps/libbitmaps.a\
../polygon/kbool/src/libkbool.a ../polygon/kbool/src/libkbool.a
EXTRACPPFLAGS += -DPCBNEW -fno-strict-aliasing -I./ -Ibitmaps -I../include -I../share\ EXTRACPPFLAGS += -DPCBNEW -fno-strict-aliasing -I./ -Ibitmaps -I../include -I../share\
-I../pcbnew -I../3d-viewer -I../polygon -I../pcbnew -I../3d-viewer -I../polygon -I/opt/local/include
#COMMON = pcbnew.h struct.h class_pad.h class_module.h class_text_mod.h \ #COMMON = pcbnew.h struct.h class_pad.h class_module.h class_text_mod.h \
# class_edge_mod.h class_equipot.h # class_edge_mod.h class_equipot.h
......
data 'vers' (2) {
$"0100 2000 0000 0531 2E30 6430 0531 2E30"
$"6430"} ;
data 'vers' (1) {
$"0100 2000 0000 0531 2E30 6430 0531 2E30"
$"6430"} ;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment