[CMake] MACOSX_BUNDLE_ICON_FILE bug

Michael Jackson mike.jackson at bluequartz.net
Sat Mar 14 10:04:22 EDT 2009


have the following cmake code:

IF (APPLE)
  SET(GUI_TYPE MACOSX_BUNDLE)
  SET(MACOSX_BUNDLE_ICON_FILE ${RoboMetTools_RESOURCES_DIR}/ 
QRoboMetImporter.icns)
  SET(PROJECT_SRCS ${PROJECT_SRCS} ${MACOSX_BUNDLE_ICON_FILE})
  SET_SOURCE_FILES_PROPERTIES(${RoboMetTools_RESOURCES_DIR}/ 
QRoboMetImporter.icns PROPERTIES
                              MACOSX_PACKAGE_LOCATION Resources)
ENDIF (APPLE)

Which for the most part works fine _until_ you try to take the bundle  
to another computer at which point the bundle looses its icon.

Started looking into this and when I inspected the info.plist file  
inside the bundle I found the following:

<key>CFBundleIconFile</key>
<string>/Users/mjackson/Workspace/RoboMetTools/Resources/ 
QRoboMetImporter.icns</string>

Which should really just be:

<key>CFBundleIconFile</key>
<string>QRoboMetImporter.icns</string>

Is it a bug that CMake is putting in the absolute path to my icon file  
instead of just the name?

Or am I just not using this part of cmake correctly?

Thanks
_________________________________________________________
Mike Jackson                  mike.jackson at bluequartz.net
BlueQuartz Software                    www.bluequartz.net
Principal Software Engineer                  Dayton, Ohio





More information about the CMake mailing list