[CMake] Errors in Info.plist of Mac GUI app for CMake 2.8.9
Michael Jackson
mike.jackson at bluequartz.net
Thu Sep 20 16:40:20 EDT 2012
I use the following macro in my own projects:
#-------------------------------------------------------------------------------
# This macro will set all the variables necessary to have a "good" OS X Application
# bundle. The variables are as follows:
# PROJECT_NAME - which can be taken from the ${PROJECT_NAME} variable is needed
# DEBUG_EXTENSION - The extension used to denote a debug built Application. Typically
# this is '_debug'
# ICON_FILE_PATH - The complete path to the bundle icon file
# VERSION_STRING - The version string that you wish to use for the bundle. For OS X
# this string is usually XXXX.YY.ZZ in type. Look at the Apple docs for more info
#-------------------------------------------------------------------------------
macro(ConfigureMacOSXBundlePlist TARGET_NAME DEBUG_EXTENSION ICON_FILE_PATH VERSION_STRING)
# message(STATUS "ConfigureMacOSXBundlePlist for ${PROJECT_NAME} ")
IF(CMAKE_BUILD_TYPE MATCHES "Release")
SET(DBG_EXTENSION "")
else()
set(DBG_EXTENSION ${DEBUG_EXTENSION})
endif()
get_filename_component(ICON_FILE_NAME "${ICON_FILE_PATH}" NAME)
set_target_properties(${TARGET_NAME} PROPERTIES
MACOSX_BUNDLE_INFO_STRING "${PROJECT_NAME}${DBG_EXTENSION} Version ${VERSION_STRING}, Copyright 2009 BlueQuartz Software."
MACOSX_BUNDLE_ICON_FILE ${ICON_FILE_NAME}
MACOSX_BUNDLE_GUI_IDENTIFIER "${PROJECT_NAME}${DBG_EXTENSION}"
MACOSX_BUNDLE_LONG_VERSION_STRING "${PROJECT_NAME}${DBG_EXTENSION} Version ${VERSION_STRING}"
MACOSX_BUNDLE_BUNDLE_NAME ${PROJECT_NAME}${DBG_EXTENSION}
MACOSX_BUNDLE_SHORT_VERSION_STRING ${VERSION_STRING}
MACOSX_BUNDLE_BUNDLE_VERSION ${VERSION_STRING}
MACOSX_BUNDLE_COPYRIGHT "Copyright 2011, BlueQuartz Software. All Rights Reserved."
)
SET(${PROJECT_NAME}_PROJECT_SRCS ${${PROJECT_NAME}_PROJECT_SRCS} ${ICON_FILE_PATH})
SET_SOURCE_FILES_PROPERTIES(${ICON_FILE_PATH} PROPERTIES
MACOSX_PACKAGE_LOCATION Resources)
endmacro()
Use/Abuse/Change to your hearts delight.
___________________________________________________________
Mike Jackson Principal Software Engineer
BlueQuartz Software Dayton, Ohio
mike.jackson at bluequartz.net www.bluequartz.net
On Sep 20, 2012, at 3:38 PM, Sean McBride wrote:
> On Thu, 20 Sep 2012 11:36:53 -0700, James Walker said:
>
>> The Info.plist for CMake 2.8-9.app has an empty string for CFBundleName,
>> making it show up without a name in utilities such as Activity Monitor.
>> It's also bad that there is an empty string for CFBundleIdentifier,
>> CFBundleVersion, CFBundleShortVersionString, CFBundleGetInfoString, and
>> NSHumanReadableCopyright.
>
> See:
> <http://public.kitware.com/Bug/view.php?id=11694>
>
> and sorta related:
> <http://public.kitware.com/Bug/view.php?id=11693>
>
> Cheers,
>
> --
> ____________________________________________________________
> Sean McBride, B. Eng sean at rogue-research.com
> Rogue Research www.rogue-research.com
> Mac Software Developer Montréal, Québec, Canada
>
>
> --
>
> 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