| 
									
										
										
										
											2012-06-08 04:09:54 +08:00
										 |  |  | # Install matlab components
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-01-29 01:03:19 +08:00
										 |  |  | include(GtsamMatlabWrap)
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-07-14 05:54:52 +08:00
										 |  |  | # Tests
 | 
					
						
							| 
									
										
										
										
											2013-08-25 02:23:07 +08:00
										 |  |  | #message(STATUS "Installing Matlab Toolbox")
 | 
					
						
							|  |  |  | install_matlab_scripts("${GTSAM_SOURCE_ROOT_DIR}/matlab/" "*.m;*.fig")
 | 
					
						
							|  |  |  | install_matlab_scripts("${GTSAM_SOURCE_ROOT_DIR}/matlab/" "README-gtsam-toolbox.txt")
 | 
					
						
							| 
									
										
										
										
											2012-07-14 05:54:52 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | # Examples
 | 
					
						
							| 
									
										
										
										
											2013-08-25 02:23:07 +08:00
										 |  |  | #message(STATUS "Installing Matlab Toolbox Examples")
 | 
					
						
							| 
									
										
										
										
											2012-07-14 05:54:52 +08:00
										 |  |  | # Matlab files: *.m and *.fig
 | 
					
						
							| 
									
										
										
										
											2013-08-25 02:23:07 +08:00
										 |  |  | #install_matlab_scripts("${GTSAM_SOURCE_ROOT_DIR}/matlab/gtsam_examples" "*.m;*.fig")
 | 
					
						
							| 
									
										
										
										
											2012-07-28 03:02:11 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | # Utilities
 | 
					
						
							| 
									
										
										
										
											2013-08-25 02:23:07 +08:00
										 |  |  | #message(STATUS "Installing Matlab Toolbox Utilities")
 | 
					
						
							|  |  |  | #install_matlab_scripts("${GTSAM_SOURCE_ROOT_DIR}/matlab/+gtsam" "*.m")
 | 
					
						
							| 
									
										
										
										
											2012-07-14 05:54:52 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-08-25 02:23:07 +08:00
										 |  |  | #message(STATUS "Installing Matlab Toolbox Example Data")
 | 
					
						
							|  |  |  | # Data files: *.graph, *.mat, and *.txt
 | 
					
						
							| 
									
										
										
										
											2012-07-14 05:54:52 +08:00
										 |  |  | file(GLOB matlab_examples_data_graph "${GTSAM_SOURCE_ROOT_DIR}/examples/Data/*.graph")
 | 
					
						
							| 
									
										
										
										
											2013-06-20 14:50:50 +08:00
										 |  |  | file(GLOB matlab_examples_data_mat "${GTSAM_SOURCE_ROOT_DIR}/examples/Data/*.mat")
 | 
					
						
							| 
									
										
										
										
											2012-07-14 05:54:52 +08:00
										 |  |  | file(GLOB matlab_examples_data_txt "${GTSAM_SOURCE_ROOT_DIR}/examples/Data/*.txt")
 | 
					
						
							| 
									
										
										
										
											2013-06-20 14:50:50 +08:00
										 |  |  | set(matlab_examples_data ${matlab_examples_data_graph} ${matlab_examples_data_mat} ${matlab_examples_data_txt}) 
 | 
					
						
							| 
									
										
										
										
											2013-08-25 02:23:07 +08:00
										 |  |  | if(GTSAM_BUILD_TYPE_POSTFIXES)
 | 
					
						
							|  |  |  | 	foreach(build_type ${CMAKE_CONFIGURATION_TYPES})
 | 
					
						
							|  |  |  | 		string(TOUPPER "${build_type}" build_type_upper)
 | 
					
						
							|  |  |  | 		if("${build_type_upper}" STREQUAL "RELEASE")
 | 
					
						
							|  |  |  | 			set(build_type_tag "") # Don't create release mode tag on installed directory
 | 
					
						
							|  |  |  | 		else()
 | 
					
						
							|  |  |  | 			set(build_type_tag "${build_type}")
 | 
					
						
							|  |  |  | 		endif()
 | 
					
						
							|  |  |  | 		# Split up filename to strip trailing '/' in GTSAM_TOOLBOX_INSTALL_PATH if there is one
 | 
					
						
							|  |  |  | 		get_filename_component(location "${GTSAM_TOOLBOX_INSTALL_PATH}" PATH)
 | 
					
						
							|  |  |  | 		get_filename_component(name "${GTSAM_TOOLBOX_INSTALL_PATH}" NAME)
 | 
					
						
							|  |  |  | 		install(FILES ${matlab_examples_data} DESTINATION "${location}/${name}${build_type_tag}/gtsam_examples/Data" CONFIGURATIONS "${build_type}")
 | 
					
						
							|  |  |  | 	endforeach()
 | 
					
						
							|  |  |  | else()
 | 
					
						
							|  |  |  | 	install(FILES ${matlab_examples_data} DESTINATION ${GTSAM_TOOLBOX_INSTALL_PATH}/gtsam_examples/Data)
 | 
					
						
							|  |  |  | endif()
 | 
					
						
							|  |  |  | 
 |