[CMake] Mac OS X Framework support

Bill Hoffman bill.hoffman at kitware.com
Wed Dec 21 11:03:00 EST 2005


Hi all,

I am looking for some advise from Mac OS X developers/users.  There
are some requests for CMake to better support Frameworks.   There
are two main requests:

1. Finding and using existing frameworks.

  For this feature, it seems that we need a new cmake command.
  FIND_FRAMEWORK.   I don't think that FIND_FILE or FIND_LIBRARY can
  be overloaded to correctly handle frameworks.   Also, there may have 
  to be a ADD_FRAMEWORK_DIRECTORY command.  Although, you could say that
  only fullpath frameworks found in FIND_FRAMEWORK add the -F, and only
  if it is not in a standard framework location.  Is this correct:
    -F/path/to/framework  (this adds the path to a framework and is like -I and -L.
     -framework name  (this is like -l framework)

  Most frameworks only have one shared library in them.  However, there are umbrella frameworks,
  like OpenGL that have more than one?


2. Creating new frameworks.  I suppose we could add support for 
  ADD_LIBRARY(foo FRAMEWORK ${srcs})
  This would bundle a shared library into a framework as described here:
  http://developer.apple.com/documentation/DeveloperTools/Conceptual/MachOTopics/index.html
  (see Loading Code at Runtime, Packaging a Shared Library as a Framework)
  However, I am not clear how the header files would get into the right place?
  This almost seems like it should be part of the install process.


So, if you are a Mac developer and have any ideas on how this stuff should be done,
please speak up.  

Thanks.

-Bill











More information about the CMake mailing list