[CMake] CPack - Mac OS X Universal dmg

Michael Wild themiwi at gmail.com
Sun Jun 20 16:07:58 EDT 2010


This is OK for the easy case, where the source code doesn't require special defines to be set depending on the architecture. Some projects define symbols, such as FOO_PPC or FOO_X86 on the command line, instead of doing the detection in-source using e.g. __ppc__ or __x86_64__, respectively. In the latter case, one has to use lipo to manually "glue" the output of multiple binary trees into universal binaries, and the use of CPack is no longer possible.

Michael


On 20. Jun, 2010, at 19:02 , Dave Partyka wrote:

> When configuring your build set *CMAKE_OSX_ARCHITECTURES * to both the
> architectures you wish to build. For example 'i386;ppc'. This will produce
> libraries/executables with both architectures embedded in them. You can
> check this by just running the 'file' command on any of the
> libraries/executables.
> 
> On Sun, Jun 20, 2010 at 10:08 AM, Nick Bolton <nick.bolton.uk at gmail.com>wrote:
> 
>> Hello,
>> 
>> I would like to build a Mac OS X Universal dmg using cpack, but
>> currently we're building an i386 - how might we build universal
>> instead?
>> 
>> Here's our CPack config:
>> 
>> http://code.google.com/p/synergy-plus/source/browse/trunk/cmake/CMakeLists_cpack.txt
>> 
>> Nick



More information about the CMake mailing list