From 1dbcfd2a982f4fc22eecdcb53e44988b14a0ffec Mon Sep 17 00:00:00 2001 From: Andy Cedilnik Date: Thu, 8 Apr 2004 17:13:42 -0400 Subject: ENH: Improve Mac OSX bundle support --- Modules/MacOSXBundleInfo.plist.in | 18 +++++++++--------- Source/cmAddExecutableCommand.cxx | 2 ++ Source/cmAddExecutableCommand.h | 20 ++++++++++++++++---- 3 files changed, 27 insertions(+), 13 deletions(-) diff --git a/Modules/MacOSXBundleInfo.plist.in b/Modules/MacOSXBundleInfo.plist.in index 1f68ccf..a466dc7 100644 --- a/Modules/MacOSXBundleInfo.plist.in +++ b/Modules/MacOSXBundleInfo.plist.in @@ -5,32 +5,32 @@ CFBundleDevelopmentRegion English CFBundleExecutable - ${APPLE_GUI_EXECUTABLE} + ${MACOSX_BUNDLE_EXECUTABLE_NAME} CFBundleGetInfoString - ${APPLE_GUI_INFO_STRING} + ${MACOSX_BUNDLE_INFO_STRING} CFBundleIconFile - ${APPLE_GUI_ICON} + ${MACOSX_BUNDLE_ICON_FILE} CFBundleIdentifier - ${APPLE_GUI_IDENTIFIER} + ${MACOSX_BUNDLE_GUI_IDENTIFIER} CFBundleInfoDictionaryVersion 6.0 CFBundleLongVersionString - ${APPLE_GUI_LONG_VERSION_STRING} + ${MACOSX_BUNDLE_LONG_VERSION_STRING} CFBundleName - ${APPLE_GUI_BUNDLE_NAME} + ${MACOSX_BUNDLE_BUNDLE_NAME} CFBundlePackageType APPL CFBundleShortVersionString - ${APPLE_GUI_SHORT_VERSION_STRING} + ${MACOSX_BUNDLE_SHORT_VERSION_STRING} CFBundleSignature ???? CFBundleVersion - ${APPLE_GUI_BUNDLE_VERSION} + ${MACOSX_BUNDLE_BUNDLE_VERSION} CSResourcesFileMapped LSRequiresCarbon NSHumanReadableCopyright - ${APPLE_GUI_COPYRIGHT} + ${MACOSX_BUNDLE_COPYRIGHT} diff --git a/Source/cmAddExecutableCommand.cxx b/Source/cmAddExecutableCommand.cxx index 71f3b57..4ccd2a7 100644 --- a/Source/cmAddExecutableCommand.cxx +++ b/Source/cmAddExecutableCommand.cxx @@ -83,6 +83,8 @@ bool cmAddExecutableCommand::InitialPass(std::vector const& args) func.m_Arguments.push_back(cmListFileArgument(f1, true)); func.m_Arguments.push_back(cmListFileArgument(f2, true)); + func.m_Arguments.push_back(cmListFileArgument("IMMEDIATE", true)); + m_Makefile->AddDefinition("MACOSX_BUNDLE_EXECUTABLE_NAME", exename.c_str()); m_Makefile->ExecuteCommand(func); #endif } diff --git a/Source/cmAddExecutableCommand.h b/Source/cmAddExecutableCommand.h index 1e36c49..ac8328d 100644 --- a/Source/cmAddExecutableCommand.h +++ b/Source/cmAddExecutableCommand.h @@ -61,13 +61,25 @@ public: virtual const char* GetFullDocumentation() { return - " ADD_EXECUTABLE(exename [WIN32] source1\n" + " ADD_EXECUTABLE(exename [WIN32] [MACBUNDLE] source1\n" " source2 ... sourceN)\n" "This command adds an executable target to the current directory. " "The executable will be built from the list of source files " - "specified. The second argument to this command can be WIN32 " - "which indicates that the executable (when compiled on windows) " - "is a windows app (using WinMain) not a console app (using main)."; + "specified.\n" + "After specifying the executable name, WIN32 and/or MACBUNDLE can " + "be specified. WIN32 indicates that the executable (when compiled on " + "windows) is a windows app (using WinMain) not a console app (using main). " + "MACBUNDLE indicates that when build on Mac OSX, executable should be in " + "the bundle form. The MACBUNDLE also allows several variables to be specified:\n" + " MACOSX_BUNDLE_INFO_STRING\n" + " MACOSX_BUNDLE_ICON_FILE\n" + " MACOSX_BUNDLE_GUI_IDENTIFIER\n" + " MACOSX_BUNDLE_LONG_VERSION_STRING\n" + " MACOSX_BUNDLE_BUNDLE_NAME\n" + " MACOSX_BUNDLE_SHORT_VERSION_STRING\n" + " MACOSX_BUNDLE_BUNDLE_VERSION\n" + " MACOSX_BUNDLE_COPYRIGHT\n" + ; } cmTypeMacro(cmAddExecutableCommand, cmCommand); -- cgit v0.12