On Fri, 2011-10-28 at 08:57 +0100, James Turner wrote: > On 26 Oct 2011, at 19:24, Geoff McLane wrote: > > > Maybe, as you have suggested, this is over kill, > > setting BOTH SIMGEAR_DIR in the environment, > > AND passing SIMGEAR_INCLUDE_DIR to cmake, > > and when I feel comfortable, I will eliminate > > one or the other for further testing... > > > > BUT now I have reached another wall... > > fgjs will not link ;=(( > > I think all these problems are related. I would suggest: > > - use CMAKE_PREFIX_PATH to get FindSimGear working. > - don't set SIMGEAR_DIR, at all - it's simply not required once the prefix > is set > - don't set the variables which FindSimGear is supposed to set (VERSION_OK, > etc), because you're only setting *some* of them, and hence your linker error > in fgjs. > > Referring to your script, I'd make the following changes: > > - the ':PATH' here looks suspicious to me > FGCM_OPTS="$FGCM_OPTS -D LIB_POSTFIX= -D > CMAKE_INSTALL_PREFIX:PATH=$INSTALL_DIR_FGFS" > I think it only needs > -D CMAKE_INSTALL_PREFIX=$INSTALL_DIR_FGFS > > - omit the 'ADDSGVOK' and 'ADDSGDIRS' pieces, which are defeating the > FindSimGear module, and hence breaking your link commands > - omit the OSG_DIR / SIMGEAR_DIR setting completely > > - set prefix path roughly like this: > > FGCM_OPTS="$FGCM_OPTS > -DCMAKE_PREFIX_PATH=$INSTALL_DIR_SIMGEAR;$INSTALL_DIR_OSG" > > Depending on what level of quote escaping is going on, you might need to > quote that argument, but I'm not enough of a shell guru to be sure. You need > the embedded semi-colon to be passed to cmake, though, not interpreted by > bash. > > Hope this helps! > > James >
Hi James, Re: In Ubuntu linux, using script ================================= Well yes, and no ;=)) Adding 2 paths, SG and OSG to CMAKE_PREFIX_PATH FAILED to find the OSG libraries, but as you point out maybe I got something wrong with the escaped quotes... But what did work was a separation into 2 :- (a) export OSG_PATH=$INSTALL_DIR_OSG (b) FGCM_OPTS="$FGCM_OPTS -DCMAKE_PREFIX_PATH=$INSTALL_DIR_SIMGEAR" The full compile link completed, and I was flying in under 15 mins... Just for good measure I also did a fresh clone, and it too compiled fine... The updated script has replaced the previous at - http://geoffair.org/tmp/makefg And when I have time will go back and try to also tidy up, and simplify the SimGear build... Re: In Windows (XP WIN32) - using CMake GUI ========================= Unfortunately, here not so good ;=(( for building FG. SG was not too bad... As mentioned, I had to add two options, PTW32_STATIC_LIB, to use pthreads (for Win32) static, and OSG_LIBRARY_STATIC, to use all static OSG libraries... After lots and lots of fiddling, changing things in the GUI, this way, then that way, was ONLY able to get a set of MSVC build files generated was by 'cheating', and adding SIMGEAR_VERSION_OK=TRUE I 'know' this is NOT GOOD, but without it could NOT convince CMake to even generate files... AND, perhaps as a consequence, of course the MSVC build files were very incomplete, in that, for the FlightGear build NO OSG nor SG libraries had been added for the link... And in fact there is no way to even give the various plug-in (static) libraries at all, but that is another issue... However, after manually 'fixing' each of the build files, I did manage to get it all linked ;=() But of course those 'fixed' build files are over written each time you run the GUI and do a new generation... And do not yet quite understand why each core SimGear library is the subject of three variables, like say SIMGEAR_BUCKET_LIBRARY SIMGEAR_BUCKET_LIBRARY_RELEASE SIMGEAR_BUCKET_LIBRARY_DEBUG Yes, in Windows we do need a Release and a Debug, separated, but what is this 1st item? Taking a clue from say the PLIB libraries, it seems this 1st should be filled in, in the form - PLIB_UL_LIBRARY = optimized;path/to/rel;debug;path/to/dbg PLIB_UL_LIBRARY_DEBUG = path/to/dbg PLIB_UL_LIBRARY_RELEASE = path/to/rel Presently for SG items have only filled in the Rel and Dbg items, which is already a BIG effort, but will try also filling it in like the PLIB items, since I recently found that one can manually 'fix' the build\CMakeCache.txt file... So this can be done faster in a good editor, than trying to fiddle in the GUI... Maybe when I do ALL this configuring things will work out better, and I can remove the SIMGEAR_VERSION_OK=TRUE ;=)) Anyway presently quite exhausted from this Windows effort ;=() At present it seems we are asking the Windows user to do a tremendous amount of configuration work BEFORE they can get into building... As always, appreciate any thought on this windows side of things... maybe I am doing something real wrong ;=() Regards, Geoff. ------------------------------------------------------------------------------ The demand for IT networking professionals continues to grow, and the demand for specialized networking skills is growing even more rapidly. Take a complimentary Learning@Cisco Self-Assessment and learn about Cisco certifications, training, and career opportunities. http://p.sf.net/sfu/cisco-dev2dev _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel