[CMake] Framework Installation Directory / Framework copying

Glenn Hughes ghughes02138 at gmail.com
Wed Dec 9 16:40:29 EST 2009


>The subtle thing
> about the Xcode Environment variables is that your CMake Code is run
> at "Cmake Time" which will have no idea about the Xcode variables that
> are set during a "Build Time".

Right. But in my case this is OK, because I evaluate the Xcode env
variable in my python script which is run at "build time" by Xcode and
not at "CMake time"...

I guess your code is doing something similar, but in the CMake
universe... Just to make sure I understand what you're doing:
You're quoting ${CONFIGURATION}  when you assemble the CMD string, so
it wont be evaluated until the command is actually run by Xcode,
right? That's a neat way of doing it, because then I could
theoretically build using vanilla make under OSX if I wanted to.

I don't want to try to generate the framework into the app bundle
itself. We've found you wind up with chicken-and-egg problems with
this approach because the Framework needs to be built before the app
so the app can link to it, but the app doesn't exist yet, etc etc.

In your custom target approach, I would need a different target for
each configuration?
I'm actually happy using my python script to do the copy, because it
can copy the whole framework, not just the dylib, and its also smart
about not copying things that are not out of date. This is some code
we'd already written so it was nice to be able to reuse it.

Anyway I've got it all working now... Thanks for the help!

Best wishes
Glenn


More information about the CMake mailing list