[CMake] Building Mac OSX .apps for Sys 10.6 and 10.8 with Cmake using 10.7.5 on the command line
Ed
sbfreddie at comcast.net
Fri Feb 8 15:02:27 EST 2013
Sean:
On Feb 8, 2013, at 11:00 AM, Sean McBride wrote:
> On Fri, 8 Feb 2013 10:53:16 -0800, Ed said:
>
>>> I've never heard of "CMAKE_OSX_64" and google has only 7 results…
>>
>> "CMAKE_OSX_64" is just a variable in the cmakelists.txt file which is
>> converted to ARCH=X86_64.
>> Does this variable need to be set to CMAKE_OSX_ARCHITECTURES=X86_64
>> instead of ARCH=X86_64?
>
> If you want to build as x86_64 you should set CMAKE_OSX_ARCHITECTURES to x86_64.
Thanks, I'll change the script
>
>> "Check with the developer to make sure OpenCPN works with this version
>> of Mac OS X. You may need to reinstall the application. Be sure to
>> install any available updates for the application and Mac OS X."
>> I cannot build the i386 version because wxWidgets 2.9.4 only supports
>> X86_64 and the 2.8.12 (which only supports i386) version of wxWidgets is
>> very buggy for the more Modern OS X operating systems.
>
> Are you sure all the various libraries you're linking with were also built with the correct deployment target?
>
> You should also try 'lipo -info /path/to/file' to make sure your app/libraries are built for the architecture you expect.
I'll try lipo
I've been using "tool -fahv" to see that they are built X86_64 but not deployment target.
>
>>> <http://www.clarkcox.com/blog/2009/06/23/sdks-and-deployment-targets/>
>>
>> I read the whole page at the Web link you mentioned but it does not
>> apply to this problem as it does not use Cmake and the article is over 3
>> years old which makes it obsolete.
>
> It is not obsolete. It explains the OS X concepts of deployment and SDK correctly (you appeared to be unfamiliar with them); these concepts have been around for many years.
>
I understand that these variables exist, but you are correct that I didn't know how to properly use them. Now I know how to use them with Xcode were is the documentation on these and the other specific Mac OS X variables that do exist in Cmake but are not documented anywhere I can find on their web site.
These variables:
CMAKE_OSX_DEPLOYMENT_TARGET
CMAKE_OSX_SYSROOT
CMAKE_OSX_ARCHITECTURES
and I am sure there are other OS X specific variables in Cmake that are not mentioned, or documented
> Cheers,
>
> --
> ____________________________________________________________
> Sean McBride, B. Eng sean at rogue-research.com
> Rogue Research www.rogue-research.com
> Mac Software Developer Montréal, Québec, Canada
More information about the CMake
mailing list