Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How do I build universal binaries on Mac OS X?

0
10 Posted

How do I build universal binaries on Mac OS X?

0

Before running CMake with an empty build tree, set the CMAKE_OSX_ARCHITECTURES environment variable. It should be set to contain a ; separated list of architectures that you want in the binary. For example, for 32-bit PowerPC and Intel you would do this: CMAKE_OSX_ARCHITECTURES=ppc;i386 If you wish to build both as 32 and 64 bit, do this: CMAKE_OSX_ARCHITECTURES=ppc;i386;ppc64;x86_64 You can also set the same named CMake cache variable on an existing binary tree. This works with both makefiles and the Xcode generator. In addition, you can also set the CMAKE_OSX_SYSROOT variable to point to the sysroot (aka Mac OS SDK) to be used. CMake will attempt to pick one on your system, but it can be changed in the cache or via an environment variable before running CMake. The 10.4u SDK or later must be used to create a Universal Binary.

0

Before running CMake with an empty build tree, set the CMAKE_OSX_ARCHITECTURES environment variable. It should be set to contain a ; separated list of architectures that you want in the binary. For example, for 32-bit PowerPC and Intel you would do this: CMAKE_OSX_ARCHITECTURES=ppc;i386 If you wish to build both as 32 and 64 bit, do this: CMAKE_OSX_ARCHITECTURES=ppc;i386;ppc64;x86_64 You can also set the same named CMake cache variable on an existing binary tree. This works with both makefiles and the Xcode generator. In addition, you can also set the CMAKE_OSX_SYSROOT variable to point to the sysroot (aka Mac OS SDK) to be used. CMake will attempt to pick one on your system, but it can be changed in the cache or via an environment variable before running CMake. The 10.4u SDK or later must be used to create a Universal Binary. Universal Binaries are essentially cross compilation and so you should avoid using TRY_RUN, especially for things like testing endianess or variable size because

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.