Installing Modules In Omegalib 5.0
![]() |
How to install omegalib modules using the CMake GUI |
MODULES
cmake variable.How does omegalib install modules
Omegalib does the following to perform module search and installation:
- During the first cmake configuration, a module list file is downloaded from a specific github repository, called the module hub. The predefined module hub is http://github.com/omega-hub/hub, and it can be customized by setting the
OMEGA_HUB_URL
CMake variable. Changing the hub repository is useful if you want to maintan your own module list. - The module list file is simply a
CMakeLists.txt
file containing a list of available modules, the url of their github repository and a brief description. - CMake populates a list with checkable boxes for each module in the list
- The user clicks on modules that should be installed, or lists their names in the
MODULES
CMake variable. The variable is particularly useful for command line configurations: for instance, typingcmake [path-to-omega-source] -DMODULES="cyclops sprite omegaVtk"
will setup an omegalib build environment with the cyclops, sprite and omegaVtk modules (and all their dependencies) - CMake clones the github repositories of all the selected modules. The repositories get cloned in the
directory. CMake then runs the/modules CMakeLists.txt
file for each module. This file is used to setup the builds of native C++ modules, specify install commands, and lists module dependencies. The module dependencies are used to install additional required modules. - The user does a cmake configure (possibly multiple times), until all the modules are downloaded and all the dependencies have been resolved.
- the build environment is ready
Due to its new modular design, a few modules that were previously included in the omegalib core are now offered as separate modules. In particular these modules are cyclops, omegaOsg, omegaVtk, rift, mvi, caveutil, cavevoc, sprite, pointCloud.
If you want to create a cmake build that contains all the modules previously offered with omegalib 4.x (and a few more), simply use this cmake command:
build> cmake <path-to-omega-source> -DMODULES="vr-bundle"
The
vr-bundle
module (you can see it here: https://github.com/omega-hub/vr-bundle/blob/master/CMakeLists.txt) is a simple, empty bundle module that just installs all the previously listed modules as its dependencies.
Comments