Skip to content

Latest commit

 

History

History
60 lines (40 loc) · 1.26 KB

include_in_cmake_project.md

File metadata and controls

60 lines (40 loc) · 1.26 KB

Include ARLib in your CMake project

If you are using CMake as you build system, including ARLib is super easy.

First of all clone ARLib in your external sources directory, for instance

$ git clone https://gitlab.com/leonardo_arcari_master_thesis/arlib.git external/arlib
Dependencies

ARLib require a C++17 compiler, CMake (>=3.5) and Boost::Graph (>= 1.65) to be locatable by CMake find_package

CMakeLists.txt

To include ARLib to the dependencies of your project, just link arlib to your CMake target.

cmake_minimum_required( VERSION 3.5 )
project( my-project )

# Add ARLib directory
add_subdirectory(external/arlib)

add_executable(my_target ...)
target_link_libraries(my_target PUBLIC arlib)
Compile and Run

From now on, the workflow is the standard CMake one

$ mkdir -p build
$ cd build
$ cmake -DCMAKE_BUILD_TYPE=Release ..
$ make

and run your target

$ build/my_target

Next steps

  • Read the Tutorial to write your first alternative-route planner.

Home