Repository navigation
Building OpenSceneGraph on Ubuntu
Tyler Lee edited this page Mar 5, 2020
·
22 revisions
sudo snap install cmake --classic
sudo apt install cmake-curses-gui xorg openbox mesa* freeglut3 freeglut3-dev gcc git
sudo apt install git
sudo snap install cmake --classicsudo apt install cmake-curses-gui
sudo apt install xorg openbox
- required OpenGL libraries
sudo apt install mesa*sudo apt install freeglut3sudo apt install freeglut3-dev
sudo apt install gcc
(Optional) Qt
- download
.runinstaller -
chmod +x *.runin the Terminal ./<RUNFILE>.run- follow on-screen instructions to install
- Qt install path with be referred to as
[QT_ROOT]by this wiki
-
git clone https://github.com/openscenegraph/OpenSceneGraph.git --branch OpenSceneGraph-X.X.XwhereX.X.Xis replaced by the latest stable tag under Branch > Tags on Github - the root OpenSceneGraph directory will be referred to as
[OSG_ROOT]by this wiki
In Terminal:
cd [OSG_FOLDER]mkdir buildmkdir installcd buildcmake ..-
ccmake .orcmake-gui-
ccmakeis a Terminal based cmake interface that displays information in a textual based interface -
CMAKE_INSTALL_PREFIX=[OSG_FOLDER]/install - (Optional)
BUILD_OSG_EXAMPLES=ON - press
[t]to toggle advanced mode - certify that
OPENGL_INCLUDE_DIR,OPENGL_gl_LIBRARY, andOPENGL_glu_LIBRARYwere found as a result offreeglutinstall - press
[c]to configure - press
[g]to generate
-
In Terminal:
-
cd [OSG_FOLDER]/buildif you aren't already there -
makeormake -j <NUMBER_OF_CORES>if you know the number of cores your computer has -
sudo make installto install the compiled OpenSceneGraph into the[OSG_FOLDER]/installfolder - Confirm that the
osgversionexecutable is in[OSG_FOLDER]/install/bin
In Terminal:
- Add the following to your
.bashrclogin file
export OSG_ROOT=[OSG_FOLDER]/install
export PATH=$PATH:$OSG_ROOT/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OSG_ROOT/libsource ~/.bashrc- Run
osgversionin the Terminal, it should tell you the version of OpenSceneGraph that you have installed
Congratulations, OpenSceneGraph is now built and installed; ready for use with OpenFrames!
- Download the resources from here