MRPT  2.0.1
mrpt_from_cmake.h
Go to the documentation of this file.
1 /* +---------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | https://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2020, Individual contributors, see AUTHORS file |
6  | See: https://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in https://www.mrpt.org/License |
8  +---------------------------------------------------------------------------+
9  */
10 
11 /** \page mrpt_from_cmake Using MRPT from your CMake project
12 
13 ## Finding MRPT from CMake
14 
15 MRPT defines exported projects that can be imported as usual in modern CMake:
16 
17 ```
18 # Find all MRPT libraries:
19 find_package(MRPT 1.9.9 COMPONENTS poses gui OPTIONAL_COMPONENTS vision)
20 message(STATUS "MRPT_VERSION: ${MRPT_VERSION}")
21 message(STATUS "MRPT_LIBRARIES: ${MRPT_LIBRARIES}")
22 
23 # Define your own targets:
24 add_executable(myapp main.cpp)
25 
26 # Link against MRPT: this will also add all required flags,
27 # include directories, etc.
28 target_link_libraries(myapp ${MRPT_LIBRARIES})
29 ```
30 or individually like:
31 
32 ```
33 # Find MRPT libraries, one by one:
34 find_package(mrpt-poses)
35 find_package(mrpt-gui)
36 
37 # Define your own targets:
38 add_executable(myapp main.cpp)
39 
40 # Link against MRPT: this will also add all required flags,
41 # include directories, etc.
42 target_link_libraries(myapp
43  mrpt::poses
44  mrpt::gui
45 )
46 ```
47 
48 
49 
50 
51 ## For MRPT 1.x
52 
53 Prior to MRPT 2.0.0, the correct way to find for MRPT was:
54 ```
55 # Find MRPT libraries:
56 find_package(MRPT REQUIRED poses gui)
57 
58 add_executable(myapp main.cpp)
59 target_link_libraries(myapp ${MRPT_LIBRARIES})
60 ```
61 
62 
63  */



Page generated by Doxygen 1.8.14 for MRPT 2.0.1 Git: 0fef1a6d7 Fri Apr 3 23:00:21 2020 +0200 at vie abr 3 23:20:28 CEST 2020