| 
									
										
										
										
											2012-01-31 13:28:02 +08:00
										 |  |  | add_custom_target(examples)
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-12-14 10:24:21 +08:00
										 |  |  | # Build example executables
 | 
					
						
							|  |  |  | FILE(GLOB example_srcs "*.cpp")
 | 
					
						
							|  |  |  | foreach(example_src ${example_srcs} )
 | 
					
						
							|  |  |  |     get_filename_component(example_base ${example_src} NAME_WE)
 | 
					
						
							|  |  |  |     set( example_bin ${example_base} )
 | 
					
						
							| 
									
										
										
										
											2012-01-31 13:28:02 +08:00
										 |  |  |     message(STATUS "Adding Example ${example_bin}")
 | 
					
						
							|  |  |  |     add_dependencies(examples ${example_bin})
 | 
					
						
							| 
									
										
										
										
											2011-12-14 10:24:21 +08:00
										 |  |  |     add_executable(${example_bin} ${example_src})
 | 
					
						
							| 
									
										
										
										
											2012-05-19 10:21:21 +08:00
										 |  |  |     
 | 
					
						
							|  |  |  |     # Disable building during make all/install
 | 
					
						
							|  |  |  |     if (GTSAM_ENABLE_INSTALL_EXAMPLE_FIX)
 | 
					
						
							|  |  |  |         set_target_properties(${example_bin} PROPERTIES EXCLUDE_FROM_ALL ON)
 | 
					
						
							|  |  |  |     endif()
 | 
					
						
							|  |  |  |     
 | 
					
						
							| 
									
										
										
										
											2011-12-16 00:17:58 +08:00
										 |  |  |     target_link_libraries(${example_bin} gtsam-static)
 | 
					
						
							| 
									
										
										
										
											2012-02-26 01:28:41 +08:00
										 |  |  |     add_custom_target(${example_bin}.run ${EXECUTABLE_OUTPUT_PATH}${example_bin} ${ARGN})
 | 
					
						
							| 
									
										
										
										
											2011-12-14 10:24:21 +08:00
										 |  |  | endforeach(example_src)
 | 
					
						
							|  |  |  | 
 |