From c2d7a555c69c6d1205d99a2d37c6d3ce6ee1a3d6 Mon Sep 17 00:00:00 2001 From: kintel Date: Sun, 15 Jun 2008 16:31:32 +0000 Subject: [PATCH] Mac OS X build system fixes --- CMakeLists.txt | 13 ++++--------- cvpcb/CMakeLists.txt | 14 +++++++++++--- cvpcb/cvpcb.r | 7 ------- eeschema/CMakeLists.txt | 14 +++++++++++--- eeschema/eeschema.r | 7 ------- gerbview/CMakeLists.txt | 14 +++++++++++--- gerbview/gerbview.r | 7 ------- kicad/CMakeLists.txt | 17 +++++++++++++---- kicad/kicad.r | 7 ------- pcbnew/CMakeLists.txt | 14 +++++++++++--- pcbnew/makefile.include | 2 +- pcbnew/pcbnew.r | 8 -------- 12 files changed, 62 insertions(+), 62 deletions(-) delete mode 100644 cvpcb/cvpcb.r delete mode 100644 eeschema/eeschema.r delete mode 100644 gerbview/gerbview.r delete mode 100644 kicad/kicad.r delete mode 100644 pcbnew/pcbnew.r diff --git a/CMakeLists.txt b/CMakeLists.txt index 43c6573c0b..76cbd7e235 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,15 +29,10 @@ endif(CMAKE_COMPILER_IS_GNUCXX) set(KICAD_BIN bin CACHE PATH "Location of KiCad binaries.") 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 CACHE PATH "") - # 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) + # 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(UNIX) if(WIN32) diff --git a/cvpcb/CMakeLists.txt b/cvpcb/CMakeLists.txt index bbea27d979..158a6c81f7 100644 --- a/cvpcb/CMakeLists.txt +++ b/cvpcb/CMakeLists.txt @@ -65,12 +65,20 @@ if(WIN32) endif(MINGW) endif(WIN32) 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) 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}) -install(TARGETS cvpcb RUNTIME DESTINATION ${KICAD_BIN} - COMPONENT binary) +install(TARGETS cvpcb + RUNTIME DESTINATION ${KICAD_BIN} + BUNDLE DESTINATION ${KICAD_BIN} + COMPONENT binary) diff --git a/cvpcb/cvpcb.r b/cvpcb/cvpcb.r deleted file mode 100644 index 79cbe6622c..0000000000 --- a/cvpcb/cvpcb.r +++ /dev/null @@ -1,7 +0,0 @@ -data 'vers' (2) { -$"0100 2000 0000 0531 2E30 6430 0531 2E30" -$"6430"} ; - -data 'vers' (1) { -$"0100 2000 0000 0531 2E30 6430 0531 2E30" -$"6430"} ; diff --git a/eeschema/CMakeLists.txt b/eeschema/CMakeLists.txt index 83e89c998c..cff9e5f08d 100644 --- a/eeschema/CMakeLists.txt +++ b/eeschema/CMakeLists.txt @@ -111,14 +111,22 @@ if(WIN32) endif(MINGW) endif(WIN32) 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) add_executable(eeschema WIN32 MACOSX_BUNDLE ${EESCHEMA_SRCS} ${EESCHEMA_EXTRA_SRCS} ${EESCHEMA_RESOURCES}) target_link_libraries(eeschema common bitmaps ${wxWidgets_LIBRARIES}) -install(TARGETS eeschema RUNTIME DESTINATION ${KICAD_BIN} - COMPONENT binary) +install(TARGETS eeschema + RUNTIME DESTINATION ${KICAD_BIN} + BUNDLE DESTINATION ${KICAD_BIN} + COMPONENT binary) add_subdirectory(plugins) diff --git a/eeschema/eeschema.r b/eeschema/eeschema.r deleted file mode 100644 index 79cbe6622c..0000000000 --- a/eeschema/eeschema.r +++ /dev/null @@ -1,7 +0,0 @@ -data 'vers' (2) { -$"0100 2000 0000 0531 2E30 6430 0531 2E30" -$"6430"} ; - -data 'vers' (1) { -$"0100 2000 0000 0531 2E30 6430 0531 2E30" -$"6430"} ; diff --git a/gerbview/CMakeLists.txt b/gerbview/CMakeLists.txt index 9a2560fcfc..e60621b833 100644 --- a/gerbview/CMakeLists.txt +++ b/gerbview/CMakeLists.txt @@ -68,12 +68,20 @@ if(WIN32) endif(MINGW) endif(WIN32) 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) 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}) -install(TARGETS gerbview RUNTIME DESTINATION ${KICAD_BIN} - COMPONENT binary) +install(TARGETS gerbview + RUNTIME DESTINATION ${KICAD_BIN} + BUNDLE DESTINATION ${KICAD_BIN} + COMPONENT binary) diff --git a/gerbview/gerbview.r b/gerbview/gerbview.r deleted file mode 100644 index 79cbe6622c..0000000000 --- a/gerbview/gerbview.r +++ /dev/null @@ -1,7 +0,0 @@ -data 'vers' (2) { -$"0100 2000 0000 0531 2E30 6430 0531 2E30" -$"6430"} ; - -data 'vers' (1) { -$"0100 2000 0000 0531 2E30 6430 0531 2E30" -$"6430"} ; diff --git a/kicad/CMakeLists.txt b/kicad/CMakeLists.txt index 3301720e5e..0afaf63c4b 100644 --- a/kicad/CMakeLists.txt +++ b/kicad/CMakeLists.txt @@ -20,15 +20,24 @@ if(WIN32) endif(MINGW) endif(WIN32) 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) -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}) -install(TARGETS kicad RUNTIME DESTINATION ${KICAD_BIN} - COMPONENT binary) +install(TARGETS kicad + RUNTIME DESTINATION ${KICAD_BIN} + BUNDLE DESTINATION ${KICAD_BIN} + COMPONENT binary) if(KICAD_MINIZIP) add_subdirectory(minizip) diff --git a/kicad/kicad.r b/kicad/kicad.r deleted file mode 100644 index 79cbe6622c..0000000000 --- a/kicad/kicad.r +++ /dev/null @@ -1,7 +0,0 @@ -data 'vers' (2) { -$"0100 2000 0000 0531 2E30 6430 0531 2E30" -$"6430"} ; - -data 'vers' (1) { -$"0100 2000 0000 0531 2E30 6430 0531 2E30" -$"6430"} ; diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index 59b4f1c5c6..e7574c61f5 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -157,15 +157,23 @@ if(WIN32) endif(MINGW) endif(WIN32) 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) 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}) -install(TARGETS pcbnew RUNTIME DESTINATION ${KICAD_BIN} - COMPONENT binary) +install(TARGETS pcbnew + RUNTIME DESTINATION ${KICAD_BIN} + BUNDLE DESTINATION ${KICAD_BIN} + COMPONENT binary) # This one gets made only when testing. diff --git a/pcbnew/makefile.include b/pcbnew/makefile.include index b1a8d5bc75..0b62098d44 100644 --- a/pcbnew/makefile.include +++ b/pcbnew/makefile.include @@ -4,7 +4,7 @@ EXTRALIBS = ../common/common.a ../bitmaps/libbitmaps.a\ ../polygon/kbool/src/libkbool.a 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 \ # class_edge_mod.h class_equipot.h diff --git a/pcbnew/pcbnew.r b/pcbnew/pcbnew.r deleted file mode 100644 index 10f6506f95..0000000000 --- a/pcbnew/pcbnew.r +++ /dev/null @@ -1,8 +0,0 @@ -data 'vers' (2) { -$"0100 2000 0000 0531 2E30 6430 0531 2E30" -$"6430"} ; - -data 'vers' (1) { -$"0100 2000 0000 0531 2E30 6430 0531 2E30" -$"6430"} ; -