Libhand library compilation error using cmake

693 views Asked by At

I'm trying to build a hand model library from libhand.org on Ubuntu 12.04. The library uses ogre and opencv libraries. I followed the instructions provided by the author that allowed me to successfully install ogre and opencv. Unfortunately when configuring a libhand library itself using cmake (by command "cmake ..") I get the following error:

CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: OGRE_RenderSystem_GL_INCLUDE_DIR (ADVANCED) used as include directory in directory /home/roman/work_dir/libhand-0.9/hand_cpp/source used as include directory in directory /home/roman/work_dir/libhand-0.9/hand_cpp/source/dot_sceneloader
used as include directory in directory /home/roman/work_dir/libhand-0.9/hand_cpp/source/dot_sceneloader/tinyxml

-- Configuring incomplete, errors occurred!

Does anyone know why this error occurs and what can be done?

2

There are 2 answers

0
Marin Šarić On BEST ANSWER

I am the libhand library author and I debugged this problem with Roman. Here's the cause and the fix to this problem:

Cause:

The OpenGL developer headers/libraries were not installed before OGRE was compiled and then installed.

OGRE silently compiles, but without OpenGL support. The code using OGRE then fails to compile because of the missing OpenGL support in OGRE.


The fix for this issue:

1) Install OpenGL development headers/libraries by doing:

sudo apt-get install freeglut3 freeglut3-dev

2) Recompile/reinstall OGRE.

When using libhand, recompiling OGRE means going into the install_help/linux_ogre_static_installer directory and running:

./install_ogre_static.sh clean

followed by

./install_ogre_static.sh build

and

sudo ./install_ogre_static.sh install

3) Clean & re-build libhand or other piece of software that reported this error.

For libhand, go to hand_cpp and do:

rm -rf build/*

followed by

cd build
cmake ..

You should not be seeing the reported error after this step and hopefully libhand will work out of the box.

0
arrowd On

CMake can't find OpenGL's header files. Install -dev package for libGL.