[CMake] OS X Icon file

Michael Jackson mike.jackson at bluequartz.net
Fri Mar 9 17:43:57 EST 2012


 SET_SOURCE_FILES_PROPERTIES(${ICON_FILE_PATH} PROPERTIES
                             MACOSX_PACKAGE_LOCATION Resources) 
--
Mike Jackson <www.bluequartz.net>

On Mar 9, 2012, at 3:46 PM, Chuck Theobald wrote:

> Hello all,
> 
> How do I specify that my icon file (.icns) be installed to the correct location in an OS X bundle? So far, I've got:
> 
> IF ( ${CMAKE_HOST_APPLE} )
>  message( "OS X build" )
>  SET( CMAKE_CXX_FLAGS " -m32 ${CMAKE_CXX_FLAGS} " )
>  SET( MACOSX_BUNDLE_INFO_STRING "MRIConvert - version 2.0" )
>  SET( MACOSX_BUNDLE_BUNDLE_VERSION "2.0" )
>  # Change following line to point to actual icns file in bundle.
>  SET( MACOSX_BUNDLE_ICON_FILE "MRIConvert.icns" )
>  SET( MACOSX_BUNDLE_GUI_IDENTIFIER "edu.uoregon.lcni.MRIConvert" )
>  SET( MACOSX_BUNDLE_BUNDLE_NAME "MRIConvert" )
> ENDIF ( ${CMAKE_HOST_APPLE} )
> 
> which creates the Info.plist file in the Contents directory. I've also got MACOSX_BUNDLE specified in my Add_Executable block, so the bundle hierarchy is created. Google does not know the answer.
> 
> Thank you,
> 
> -- 
> Chuck Theobald
> System Administrator
> The Robert and Beverly Lewis Center for Neuroimaging
> University of Oregon
> P: 541-346-0343
> F: 541-346-0345
> 
> --
> 
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake



More information about the CMake mailing list