[CMake] OSX_BUNDLE_PLIST Use

Michael Jackson mike.jackson at bluequartz.net
Thu Dec 9 16:02:00 EST 2010


I'll answer my own stupid question:

if (APPLE)
     set_target_properties(${QHDFViewer_EXE_NAME} PROPERTIES
               MACOSX_BUNDLE_INFO_PLIST ${QHDFViewer_BINARY_DIR}/ 
QHDFViewer.plist)
endif()

Didn't notice that "MACOSX_BUNDLE_INFO_PLIST" was a property and NOT a  
variable. Working now. Sorry for the noise.

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



On Dec 9, 2010, at 3:51 PM, Michael Jackson wrote:

> I have the following CMake for code for an OS X Application:
> SET(MACOSX_BUNDLE_INFO_STRING "${PROJECT_NAME}${DBG_EXTENSION},  
> Copyright 2010 BlueQuartz Software.")
> SET(MACOSX_BUNDLE_ICON_FILE ${ICON_FILE_NAME})
> SET(MACOSX_BUNDLE_GUI_IDENTIFIER "${PROJECT_NAME}${DBG_EXTENSION}")
> SET(MACOSX_BUNDLE_LONG_VERSION_STRING "${PROJECT_NAME}$ 
> {DBG_EXTENSION} Version ${VERSION_STRING}")
> SET(MACOSX_BUNDLE_BUNDLE_NAME ${PROJECT_NAME}${DBG_EXTENSION})
> SET(MACOSX_BUNDLE_SHORT_VERSION_STRING ${CMP_VERSION})
> SET(MACOSX_BUNDLE_BUNDLE_VERSION ${CMP_VERSION})
> SET(MACOSX_BUNDLE_COPYRIGHT "Copyright 2010, BlueQuartz Software.  
> All Rights Reserved.")
>
> configure_file(${QHDFViewer_SOURCE_DIR}/QHDFViewer.plist.in
>                ${QHDFViewer_BINARY_DIR}/QHDFViewer.plist)
> set(MACOSX_BUNDLE_INFO_PLIST ${QHDFViewer_BINARY_DIR}/ 
> QHDFViewer.plist)
> message(STATUS "MACOSX_BUNDLE_INFO_PLIST: $ 
> {MACOSX_BUNDLE_INFO_PLIST}")
> SET(${PROJECT_NAME}_PROJECT_SRCS ${${PROJECT_NAME}_PROJECT_SRCS}
>                                  ${PROJECT_RESOURCES_DIR}/Icons/icns/ 
> ${PROJECT_NAME}.icns
>                                  ${QHDFViewer_SOURCE_DIR}/ 
> hdf5file.icns)
> SET_SOURCE_FILES_PROPERTIES(${ICON_FILE_PATH} PROPERTIES
>                             MACOSX_PACKAGE_LOCATION Resources)
> SET_SOURCE_FILES_PROPERTIES(${QHDFViewer_SOURCE_DIR}/hdf5file.icns  
> PROPERTIES
>                             MACOSX_PACKAGE_LOCATION Resources)
>
> But the final application does not have my custom plist installed  
> instead having the default plist that cmake would normally generate.  
> How exactly should I be setting a custom plist file?
>
> Thanks
> ___________________________________________________________
> Mike Jackson                      www.bluequartz.net
> Principal Software Engineer       mike.jackson at bluequartz.net
> BlueQuartz Software               Dayton, Ohio
>
>
>



More information about the CMake mailing list