[CMake] Re: Mac OS X Framework support

William A. Hoffman billlist at nycap.rr.com
Fri Dec 23 08:39:50 EST 2005


At 07:13 PM 12/22/2005, E. Wing wrote:
>So for example, in the SDL case, we might have:
>FIND_PATH(SDL_INCLUDE_DIR SDL.h
>/usr/local/include
>...
>)
>And in the OSG case, we might have
>FIND_PATH(OSG_INCLUDE_DIR osg/PositionAttitudeTransform
>/usr/local/include
>...
>)
>
>In both cases, using a similar mechanism to what FIND_LIBRARY goes
>though to find frameworks, the frameworks will be searched for these
>headers.
>
>In the SDL case, the path returned could be
>/Library/Frameworks/SDL.framework/Headers
>
>In the OSG case, the path returned could be
>/Library/Frameworks/osg.framework (I suggest we append the
>osg.framework part so we know we are dealing with a framework. Just
>having the string to /Library/Frameworks might be ambiguous if the
>framework is located in a non-standard directory.)
>
>Then when these paths are passed to INCLUDE_DIRECTORIES,
>INCLUDE_DIRECTORIES parses the string and decides if -I or -F should
>be used. With SDL, since there is a trailing "Headers" directory, -I
>should be used an the path is just used as is.
>With OSG, since there is no trailing Headers, truncate off the
>osg.framework part and use -F/Library/Frameworks


OK, this sounds good, although I think there needs to be someway
to name the framework we are looking for in the FIND_PATH, although
that would mean changing existing FIND_PATH calls, which we want to avoid.
I am concerned that an exhaustive search of all found/installed frameworks for
SDL.h may be slow.    Using FIND_LIBRARY to find a framework is easy because
the name of the thing plus a .framework is the name of the framework.  However,
a call to FIND_PATH (foo.h)  gives us no information about what package foo.h is
in, and requires a modification for the mac.   Any ideas?

-Bill
  



More information about the CMake mailing list