OpenSceneGraph: Difference between revisions

Jump to navigation Jump to search
→‎Compilation workaround: Added a description how to deal with OSG's lack of --prefix support.
(→‎Compilation workaround: Added a description how to deal with OSG's lack of --prefix support.)
Line 31: Line 31:


Do not forget to run autogen.sh when updating sources.
Do not forget to run autogen.sh when updating sources.
=== Installing FlightGear and OSG with --prefix workaround ===
If you use --prefix to choose were to install FlightGear and do not want to install OSG globally on the system this can be done with the following method
(description for Linux):
1. Build OpenScenGraph. I do it directly in the OSG source directory without installing anything (when the next version comes I can just delete the old directory without any worries). Adjust as needed:
export OSG_BASE=$HOME/FlightGear/build/OpenSceneGraph/OSG_OP_OT-1.2-Flightgear
export OPENTHREADS_INC_DIR=$OSG_BASE/OpenThreads/include
export OPENTHREADS_LIB_DIR=$OSG_BASE/OpenThreads/lib/Linux32
export PRODUCER_INC_DIR=$OSG_BASE/Producer/include
export PRODUCER_LIB_DIR=$OSG_BASE/Producer/lib/Linux32
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OPENTHREADS_LIB_DIR:$PRODUCER_LIB_DIR
cd OpenThreads; make
cd ../Producer; make
cd ../OpenScenGraph; make
2. Copy or (soft)link OpenThreads/include/OpenThreads into your $PREFIX/include/ directory.
3. Copy or (soft)link Producer/include/Producer into your $PREFIX/include/ directory.
4. Copy or (soft)link OpenSceneGraph/include/OpenSceneGraph into your $PREFIX/include/ directory.
5. Copy or (soft)link OpenThreads/lib/<system>/lib*.so into your $PREFIX/lib/ directory.
6. Copy or (soft)link Producer/lib/<system>/lib*.so into your $PREFIX/lib/ directory.
7. Copy or (soft)link OpenSceneGraph/lib/<system>/lib*.so into your $PREFIX/lib/ directory.
8. Add $PREFIX/lib to LD_LIBRARY_PATH.
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PREFIX/lib
9. Configure and build SimGear and FlightGear with --prefix as usual.
No need to install any quickly changing software globally.
Installing with --prefix is a very nice way to keep several distinct and independent versions of FlightGear around. To start a new $PREFIX directory you'll also need to install plib in it, but that is easy. Most other needed dependencies are usually available through the package system of most Linux distributions (e.g. FreeGLUT, SDL, ALSA, etc).


== Current Issues ==
== Current Issues ==
827

edits

Navigation menu