-
Notifications
You must be signed in to change notification settings - Fork 14
Building OpenFrames on Ubuntu
Tyler Lee edited this page Mar 5, 2020
·
9 revisions
The OpenFrames build process can be broken down into four main steps:
- Download and configure the dependencies
- Create the build system using CMake
- Build OpenFrames
- Run OpenFrames
The first two steps are generally "one-time" processes that are performed immediately after downloading the OpenFrames repository. They result in a build system (e.g. Visual Studio solution or makefiles) that will intelligently rebuild OpenFrames components as needed when source or configuration files are changed.
Below are step-by-step instructions on how to perform the aforementioned steps along with the background requirements that are needed before beginning.
This tutorial was most recently tested and run on Ubuntu 18.04.1
sudo snap install cmake
- used to generate build system
- used
3.16.5
as tested
sudo apt install gcc
- used version
7.4.0
as tested
(Optional) Winteracter Open Motif
- used if you want to to build the Winteracter demo
- download the latest static library for your architecture (32-bit or 64-bit) and place it in a convenient location
- it is recommended to place it in the Winteracter lib directory (e.g.
lib.ifi64
) next to the existing Winteracter libraries
- clone the OpenFrames repository
git clone https://github.com/ravidavi/OpenFrames.git
- when checking out, ensure you have selected the "develop" branch instead of the "Master" branch
cd OpenFrames
git checkout develop
- the root OpenFrames folder will be referred to as
[OF_FOLDER]
on this page
In Terminal:
cd [OF_FOLDER]
mkdir build
mkdir install
cd build
cmake ..
-
ccmake .
orcmake-gui .
- this is a Terminal/GUI based cmake that displays information in a textual/graphical based interface
-
CMAKE_INSTALL_PREFIX
=[OF_FOLDER]/install
- press
[c]
to configure - if any
XXX_LIBRARY
file path is not found, edit the entry- may require the advanced mode edit
-
XXX_LIBRARY
=[OSG_FOLDER]/install/lib64/<filename>.so
- press
[c]
to configure
- press
[q]
to quit
- (Optional)
ccmake -D WINTER_ROOT:PATH=
[PATH_TO_YOUR_WINTERACTER]`- this is a Terminal based cmake that displays information in a textual based interface
- press
[c]
to configure - press
[g]
to generate - press
[q]
to quit
In Terminal:
- Go to the
[OF_FOLDER]/build
folder. - Type
make
ormake -j N
whereN
is the number of cores your computer has. - Type
sudo make install
to install the compiled OpenFrames into the[OF_FOLDER]/install
folder - Confirm that the
ofviewer
executable is in[OF_FOLDER]/install/bin
In Terminal:
- Add the following lines to your
.bashrc
export OF_ROOT=[OF_FOLDER]/install
export PATH=$PATH:$OF_ROOT/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OF_ROOT/lib
- Download and unzip the OpenSceneGraph Data Resources if you haven't already from installing OpenSceneGraph
cd <UNZIPPED_OSG_FOLDER>
ofviewer cow.osg
Congratulations, OpenFrames is now built and installed.