Sean McBride wrote:
On 2/15/08 7:38 PM, Bill Hoffman said:

I am not sure what a .nib file is.

It's a kind of resource.  Usually it contains windows and buttons and
the like.  See:
<http://developer.apple.com/documentation/CoreFoundation/Conceptual/
CFBundles/Concepts/BundleAnatomy.html#//apple_ref/doc/uid/20001119-BAJFIBAJ>

for examples of things that can go in Mac OS bundles.  Nibs go in /
Resources, or in language-specific subfolders there of.

See http://www.cmake.org/HTML/Documentation.html
ADD_EXECUTABLE: Add an executable to the project using the specified source files.

  ADD_EXECUTABLE(exename [WIN32] [MACOSX_BUNDLE] [EXCLUDE_FROM_ALL]
                 source1 source2 ... sourceN)

MACOSX_BUNDLE indicates that when build on Mac OSX, executable should be in the bundle form.

The MACOSX_BUNDLE also allows several variables to be specified:

  MACOSX_BUNDLE_INFO_STRING
  MACOSX_BUNDLE_ICON_FILE
  MACOSX_BUNDLE_GUI_IDENTIFIER
  MACOSX_BUNDLE_LONG_VERSION_STRING
  MACOSX_BUNDLE_BUNDLE_NAME
  MACOSX_BUNDLE_SHORT_VERSION_STRING
  MACOSX_BUNDLE_BUNDLE_VERSION
  MACOSX_BUNDLE_COPYRIGHT

It configures a those variables into this file:
Modules/MacOSXBundleInfo.plist.in

Then that file gets made part of the bundle.

Yes, and this is great.  However, the MACOSX_BUNDLE_* properties are but
a subset of things that can go into an Info.plist file.  For a longer
list, see:
<http://developer.apple.com/documentation/MacOSX/Conceptual/
BPRuntimeConfig/Articles/PListKeys.html>

Is CMake able to take a pre-existing Info.plist file and place it the bundle?

Sure can...

  std::string f1 =
      this->Makefile->GetModulesFile("MacOSXBundleInfo.plist.in");

So, if you put a MacOSXBundleInfo.plist.in file in your project then set CMAKE_MODULE_PATH it will pick that one up instead of the one in the CMake Modules directory.

-Bill

_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to