Skip to content
Snippets Groups Projects
Commit 9608aef3 authored by Joan Vallvé Navarro's avatar Joan Vallvé Navarro
Browse files

Update README.md code like

parent 0017c6c5
No related branches found
No related tags found
1 merge request!2Devel
# FALKOLib - Fast Adaptive Laser Keypoint Orientation-invariant # FALKOLib - Fast Adaptive Laser Keypoint Orientation-invariant
#### Copyright (C) 2016 Fabjan Kallasi and Dario Lodi Rizzini. #### Copyright (C) 2016 Fabjan Kallasi and Dario Lodi Rizzini.
...@@ -61,33 +60,33 @@ which has been included in folder EXTERNAL. ...@@ -61,33 +60,33 @@ which has been included in folder EXTERNAL.
HOW TO COMPILE HOW TO COMPILE
------------------------------------------------- -------------------------------------------------
Let ${falkolib_ROOT} be the install directory of your local copy Let `${falkolib_ROOT}` be the install directory of your local copy
of library falkolib. of library falkolib.
The following standard commands are required to compile it: The following standard commands are required to compile it:
- cd ${falkolib_ROOT} - `cd ${falkolib_ROOT}`
- mkdir build - `mkdir build`
- cd build - `cd build`
- cmake .. - `cmake ..`
- make - `make`
You can also install the library into a system directory. You can also install the library into a system directory.
To change the install directory you must set cmake environment To change the install directory you must set cmake environment
variable ${CMAKE_INSTALL_PREFIX} (e.g. using command "ccmake .." variable `${CMAKE_INSTALL_PREFIX}` (e.g. using command "ccmake .."
before calling "cmake .."). before calling "cmake ..").
Its default value on UNIX-like/Linux systems is "/usr/local". Its default value on UNIX-like/Linux systems is "/usr/local".
After compiling library falkolib, run the command: After compiling library falkolib, run the command:
- sudo make install - `sudo make install`
The command "sudo" is required only if ${CMAKE_INSTALL_PREFIX} The command "sudo" is required only if `${CMAKE_INSTALL_PREFIX}`
is a system diretory managed by administrator user root. is a system diretory managed by administrator user root.
Such command copies: Such command copies:
- header files of ${falkolib_ROOT}/include/falkolib to - header files of `${falkolib_ROOT}/include/falkolib` to
${CMAKE_INSTALL_PREFIX}/include/falkolib/ `${CMAKE_INSTALL_PREFIX}/include/falkolib/`
- library files ${falkolib_ROOT}/lib/libfalkolib.a to - library files `${falkolib_ROOT}/lib/libfalkolib.a` to
${CMAKE_INSTALL_PREFIX}/lib/ `${CMAKE_INSTALL_PREFIX}/lib/`
- cmake script ${falkolib_ROOT}/cmake_modules/falkolibConfig.cmake to - cmake script `${falkolib_ROOT}/cmake_modules/falkolibConfig.cmake` to
${CMAKE_INSTALL_PREFIX}/share/falkolib/ ${CMAKE_INSTALL_PREFIX}/share/falkolib/
...@@ -99,28 +98,28 @@ then it is straighforward to use it in your projects. ...@@ -99,28 +98,28 @@ then it is straighforward to use it in your projects.
You needs to add the following lines to your project as in this example: You needs to add the following lines to your project as in this example:
> CMAKE_MINIMUM_REQUIRED(VERSION 2.8) ```cmake
> PROJECT(foobar) CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
> PROJECT(foobar)
> find_package(falkolib REQUIRED)
> message(STATUS "falkolib_FOUND ${falkolib_FOUND}")
> message(STATUS "falkolib_INCLUDE_DIRS ${falkolib_INCLUDE_DIRS}")
> message(STATUS "falkolib_LIBRARY_DIRS ${falkolib_LIBRARY_DIRS}")
> message(STATUS "falkolib_LIBRARIES ${falkolib_LIBRARIES}")
>
> if(${falkolib_FOUND})
> include_directories(${falkolib_INCLUDE_DIRS})
> link_directories(${falkolib_LIBRARY_DIRS})
> endif()
>
> add_executable(foobar foobar.cpp)
> target_link_libraries(foobar ${falkolib_LIBRARIES})
The above example uses the variables defined in falkolibConfig.cmake: find_package(falkolib REQUIRED)
message(STATUS "falkolib_FOUND ${falkolib_FOUND}")
message(STATUS "falkolib_INCLUDE_DIRS ${falkolib_INCLUDE_DIRS}")
message(STATUS "falkolib_LIBRARY_DIRS ${falkolib_LIBRARY_DIRS}")
message(STATUS "falkolib_LIBRARIES ${falkolib_LIBRARIES}")
if(${falkolib_FOUND})
include_directories(${falkolib_INCLUDE_DIRS})
link_directories(${falkolib_LIBRARY_DIRS})
endif()
- falkolib_FOUND - system has falkolib module add_executable(foobar foobar.cpp)
- falkolib_INCLUDE_DIRS - the falkolib include directories target_link_libraries(foobar ${falkolib_LIBRARIES})
- falkolib_LIBRARY_DIRS - the falkolib library directories ```
- falkolib_LIBRARIES - link these to use falkolib
The above example uses the variables defined in falkolibConfig.cmake:
- `falkolib_FOUND` - system has falkolib module
- `falkolib_INCLUDE_DIRS` - the falkolib include directories
- `falkolib_LIBRARY_DIRS` - the falkolib library directories
- `falkolib_LIBRARIES` - link these to use falkolib
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment