Re: Building "universal" binaries for MacOS


rmi...@...
 

I am working on a patch right now but it looks like you may be able to use CMAKE_TOOLCHAIN_FILE in the meantime.  You would make a file Toolchain-osx-fat.cmake with:
SET(CMAKE_OSX_ARCHITECTURES x86_64 i386)

Then use the flag -DCMAKE_TOOLCHAIN_FILE=<path to file>/Toolchain-osx-fat.cmake where <path to file> is the full path to Toolchain-osx-fat.cmake

I am currently not in a position to test this.  Please tell me if it works.


On Monday, May 26, 2014 2:12:58 PM UTC-7, Andrea Mantler wrote:
I would like to build fat binaries with x86_64 and i386 architecture support.  I've tried passing the flag
    -DCMAKE_OSX_ARCHITECTURES=x86_64;i386
to cmake, but it appears that flag isn't being carried down to the building of libtinyxml.a and libyaml-cpp.a:

    ld: warning: in ../../ext/dist/lib/libtinyxml.a, file was built for unsupported file format which is not the architecture being linked (i386)
    ld: warning: in ../../ext/dist/lib/libyaml-cpp.a, file was built for unsupported file format which is not the architecture being linked (i386)

(Note:  I get the same errors if I try to build for just i386.)

Does anyone have any suggestions for what I can try?  Thanks! 

Join {ocio-dev@lists.aswf.io to automatically receive all group messages.