Hi Matt, I have opened a bug for this [1] and will take a look at it.
Best, Caspar [1] http://bugs.mitk.org/show_bug.cgi?id=15094 ________________________________________ Von: Clarkson, Matt [[email protected]] Gesendet: Donnerstag, 9. Mai 2013 15:51 An: mitk-users Betreff: [mitk-users] Mac Icon in bundle Hi there, a quick question. In FunctionCreateBlueBerryApplication.cmake there is: # ----------------------------------------------------------------------- # Add executable icon (Mac) # ----------------------------------------------------------------------- if(APPLE) if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/icons/icon.icns") set_target_properties(${_APP_NAME} PROPERTIES MACOSX_BUNDLE_ICON_FILE "${CMAKE_CURRENT_SOURCE_DIR}/icons/icon.icns") file(COPY ${MACOSX_BUNDLE_ICON_FILE} DESTINATION "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_APP_NAME}.app/Contents/Resources/") file(INSTALL ${MACOSX_BUNDLE_ICON_FILE} DESTINATION "${_APP_NAME}.app/Contents/Resources/") endif() endif() However, the COPY command and INSTALL command is passing in the name of a target property as the name of the file. As far as I can tell, these are empty, and hence the icon is not copied. Also, in my Info.plist file within the final bundle, produced as a result of the packaging process, the location of the icon file is given as the location of the file within the build tree, which is wrong when copied to another machine. Should it be something like this: # ----------------------------------------------------------------------- # Add executable icon (Mac) # ----------------------------------------------------------------------- if(APPLE) set(icon_name "icon.icns") set(icon_location ${CMAKE_CURRENT_SOURCE_DIR}/icons/${icon_name}) if(EXISTS "${icon_location}") set_target_properties(${_APP_NAME} PROPERTIES MACOSX_BUNDLE_ICON_FILE ${icon_name}) set_target_properties(${_APP_NAME} PROPERTIES MACOSX_BUNDLE_ICON_FILE ${icon_location}) file(COPY ${icon_location} DESTINATION "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${_APP_NAME}.app/Contents/Resources/") file(INSTALL ${icon_location} DESTINATION "${_APP_NAME}.app/Contents/Resources/") endif() endif() Also, for bug 13517, this was done for mitkWorkbench: #Setting application icon for mac os x systems set_target_properties(mitkWorkbench PROPERTIES MACOSX_BUNDLE_ICON_FILE "icon.icns") if(APPLE) install(FILES "icons/icon.icns" DESTINATION "mitkWorkbench.app/Contents/Resources") endif(APPLE) which seems to agree with the above proposal. Please can someone check this, as I am unfamiliar with this stuff. Thanks Matt ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. This 200-page book is written by three acclaimed leaders in the field. The early access version is available now. Download your free book today! http://p.sf.net/sfu/neotech_d2d_may _______________________________________________ mitk-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mitk-users ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. This 200-page book is written by three acclaimed leaders in the field. The early access version is available now. Download your free book today! http://p.sf.net/sfu/neotech_d2d_may _______________________________________________ mitk-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mitk-users
