Skip to content
Snippets Groups Projects
Commit f90e6a2c authored by Manuel Günther's avatar Manuel Günther
Browse files

Updated README

parent 77f26815
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,7 @@ project(test)
# Set the module path so that "FindBob.cmake" is found
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR})
# Find all Bob packages recursively
find_package(Bob COMPONENTS bob.io.image REQUIRED)
......
......@@ -8,14 +8,8 @@
:target: https://www.idiap.ch/software/bob/docs/latest/bioidiap/bob.example.cmake/master/index.html
.. image:: http://travis-ci.org/bioidiap/bob.example.cmake.svg?branch=master
:target: https://travis-ci.org/bioidiap/bob.example.cmake?branch=master
.. image:: https://coveralls.io/repos/bioidiap/bob.example.cmake/badge.png?branch=master
:target: https://coveralls.io/r/bioidiap/bob.example.cmake?branch=master
.. image:: https://img.shields.io/badge/github-master-0000c0.png
:target: https://github.com/bioidiap/bob.example.cmake/tree/master
.. image:: http://img.shields.io/pypi/v/bob.example.cmake.png
:target: https://pypi.python.org/pypi/bob.example.cmake
.. image:: http://img.shields.io/pypi/dm/bob.example.cmake.png
:target: https://pypi.python.org/pypi/bob.example.cmake
===========================================
Example project using Bob's C++ interface
......@@ -24,7 +18,7 @@
This example project shows a way to incorporate Bob's C++ libraries into a C++ project.
For this, is uses the CMake_ interface, and a home-developed ``FindBob.cmake`` file.
It relies on the python interface to download and install Bob_.
More information about the Bob installation can be found on its `webpage <bob>`_.
More information about the Bob installation can be found on its `webpage <http://www.idiap.ch/software/bob>`_.
Building this example
......@@ -48,19 +42,22 @@ Later, you can use three CMake_ variables ``Bob_INCLUDE_DIRS``, ``Bob_LIBRARY_DI
cmake_minimum_required(VERSION 2.8)
project(test)
# Tell CMake, where to find the "FindBob.cmake" file
# Set the module path so that "FindBob.cmake" is found
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR})
# Find Bobs packages and its dependencies
# Find all Bob packages recursively
find_package(Bob COMPONENTS bob.io.image REQUIRED)
# add information to your project
# Add Bob's include directories
include_directories(${Bob_INCLUDE_DIRS})
# Add Bob's library directories
link_directories(${Bob_LIBRARY_DIRS})
add_definitions(${Bob_DEFINITIONS})
# Add Bob's libraries
link_libraries(${Bob_LIBRARIES} boost_system)
# Add Bob's definitions
add_definitions(${Bob_DEFINITIONS})
# link an executable
# create an "my_test" executable from file "test.cpp"
add_executable(my_test test.cpp)
For some reason (that I do not understand) we also need to add the ``boost_system`` library, although it shoud theoretically be linked to the Bob_ libraries already.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment