| 
									
										
										
										
											2019-06-22 15:51:15 +08:00
										 |  |  | # This file shows how to build and link a user project against GTSAM using CMake
 | 
					
						
							|  |  |  | ###################################################################################
 | 
					
						
							|  |  |  | # To create your own project, replace "example" with the actual name of your project
 | 
					
						
							|  |  |  | cmake_minimum_required(VERSION 3.0)
 | 
					
						
							|  |  |  | project(example CXX)
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # Find GTSAM, either from a local build, or from a Debian/Ubuntu package.
 | 
					
						
							|  |  |  | find_package(GTSAM REQUIRED)
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | add_executable(example | 
					
						
							|  |  |  |   main.cpp
 | 
					
						
							|  |  |  | )
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # By using CMake exported targets, a simple "link" dependency introduces the
 | 
					
						
							| 
									
										
										
										
											2023-02-06 23:48:10 +08:00
										 |  |  | # include directories (-I) flags, and add any other
 | 
					
						
							| 
									
										
										
										
											2019-06-22 15:51:15 +08:00
										 |  |  | # required build flags (e.g. C++11, etc.)
 | 
					
						
							|  |  |  | target_link_libraries(example PRIVATE gtsam)
 |