Am 05.11.11 03:27, schrieb Roland Häder:
> On Sat, 2011-11-05 at 01:31 +0100, HB-GRAL wrote:
>> Hi James
>>
>> I successfully built simgear/flightgear today with cmake 2.8.4 and OSX
>> 10.6.8. There have been some small changes I added to CMakeLists for
>> sg/fg: SET(CMAKE_CXX_FLAGS "-arch i386") and SET(CMAKE_C_FLAGS "-arch
>> i386"). I am sure there is a better way to set this flags with cmake.
>>
>> Many thanks, Cheers, Yves
> Hi Yves,
>
> yes there is. Use environmental variables. E.g. create a script named
> "reconfigure.sh" and put this in:
>
> #!/bin/sh
>
> CFLAGS="-g -O3 -fPIC -arch i386"
> CXXFLAGS="-g -O3 -fPIC -arch i386"
>
> cmake ../../simgear \
>    -DJPEG_FACTORY=1 \
>    -DCMAKE_INSTALL_PREFIX=/opt
>
> #[EOF]
>
> Hope this works.
>
> Regards,
> Roland
>

Hi Roland, yes this works well, though I had to change to "export 
CFLAGS= ...."  and I used also "-O2". Now it is time to have a small 
yves-osx-fg/sg-script here, gitpull-export-cmake-make-makeinstall, nice.

Maybe how to set this flags for OSX should go to the readme once. I 
think some OSX users will end up with linking errors because simgear 
compiles "well" with x86_64, but then you run into a lot of problems 
trying to compile flightgear, on OSX. Btw. I tried also to set the flags 
via ccmake like I do it for OSG, but unfortunately without success. 
Sorry for my shortcomings with cmake, I am very fixated on the old build 
system probably, and now it so easy with cmake ;-)

Cheers, Yves

------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to