On 21. May, 2010, at 16:42 , Jérôme VERNET wrote:

> 
> Hi,
> 
> I'm trying to update an existing cmake project to be used on MacOsX. After a 
> lot of thinking, I can now build, using the right framworks/library/using the 
> good SDK/on the right ARCHitecture... It was hard, because there is nearly no 
> MacOsX cmake documentation (or not up to date).
> 
> The last thing I'm stucked on is:
> - how can cmake copy some Frameworks in the Ressources folder of my bundled 
> app ? I need to copy SDL.Framework, for example.

fixup_bundle in BundleUtilities.cmake will do this for you. Unfortunately the 
functions are not documented in the header-comment, so you have to look into 
the file to read it. however, I remember there being problems with SDL which 
doesn't require fixing up since the install_name is already set for use as a 
private framework in a app bundle. Search the list archives, I'm pretty sure 
there was a solution.

> - how can cmake can copy my localized resources (French.lproj and 
> English.lproj) in my bundled app ?
> I tried this:
> # When building for OSX, define specific sources for gui and ressources
> if(ENABLE_OSX_BUNDLE)
> set(GUIOSX_SOURCES
> gui-osx/AlertHooks.m gui-osx/PrefsController.m gui-osx/Shared.m
> gui-osx/CreateFloppyController.m gui-osx/SDLMain.m)
> set_source_files_properties(${GUIOSX_SOURCES} PROPERTIES LANGUAGE C)
> set(GUIOSX_RSRCS
>   gui-osx/Hatari.icns
>   gui-osx/English.lproj gui-osx/French.lproj)
> endif(ENABLE_OSX_BUNDLE)
> But I have an error about Copying gui-osx/English.lproj at the end....

Well, the actual error message would have been of help here, wouldn't it? And 
while you're at it, run with "make VERBOSE=1" in order to see the actual 
commands being run.

> 
> For the second point, it was working when there is only one file, but now, 
> there is folder to be copied.

See my last remark.

> 
> What about "fixBundle" ? I wcannot find any documentation....

See above.

> Next thing i will need help:
> - I will have a problem that I cannot yet resolve: building an i386 app for 
> debbugging, and an Universal (x86;ppc) for Release... Tried without success...

WHAT did you try? Usually one has different build trees. One for release and 
the other for debug builds (or even more trees, depending on your needs). This 
also depends on whether you are using the Xcode generator or the Unix Makefiles 
generator (personally, I recommend the latter...). Besides, apart from size and 
build times, there's nothing that speaks against debugging a universal binary.

> I read a previous thread in this mailing list, but cannot find a solution.

WHAT thread? You know, nobody here can see inside your head...

> - Make a different build system when building on MacOsX 10.5 or 10.6. When 
> using 10.5, I will need to use library that are not provided by MacOs 10.5 
> (readline, libpng, etc) in the good version. So, make will have to find them 
> elsewhere or display an error. May be there is a way to find a version number 
> ?

Don't get too fancy here. At most parse the version information from the 
headers (e.g. look at FindGTK2.cmake on how to do this).

> - ....


What is ... here? Are you expecting help for something you don't even know 
about? ;-)


Michael

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to