| 
									
										
										
										
											2011-12-14 10:24:21 +08:00
										 |  |  | # Build/install Wrap
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-07-18 22:09:19 +08:00
										 |  |  | set(WRAP_BOOST_LIBRARIES ${Boost_SYSTEM_LIBRARY} ${Boost_FILESYSTEM_LIBRARY} ${Boost_THREAD_LIBRARY} ${Boost_REGEX_LIBRARY})
 | 
					
						
							| 
									
										
										
										
											2012-06-06 03:25:31 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-10-25 22:10:28 +08:00
										 |  |  | # Allow for disabling serialization to handle errors related to Clang's linker
 | 
					
						
							|  |  |  | option(GTSAM_WRAP_SERIALIZATION "If enabled, allows for wrapped objects to be saved via boost.serialization" ON)
 | 
					
						
							|  |  |  | if (NOT GTSAM_WRAP_SERIALIZATION)
 | 
					
						
							|  |  |  |     add_definitions(-DWRAP_DISABLE_SERIALIZE)
 | 
					
						
							|  |  |  | endif()  
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2011-12-14 10:24:21 +08:00
										 |  |  | # Build the executable itself
 | 
					
						
							| 
									
										
										
										
											2011-12-14 10:24:25 +08:00
										 |  |  | file(GLOB wrap_srcs "*.cpp")
 | 
					
						
							| 
									
										
										
										
											2012-07-03 23:33:16 +08:00
										 |  |  | file(GLOB wrap_headers "*.h")
 | 
					
						
							| 
									
										
										
										
											2012-06-30 09:43:44 +08:00
										 |  |  | list(REMOVE_ITEM wrap_srcs ${CMAKE_CURRENT_SOURCE_DIR}/wrap.cpp)
 | 
					
						
							| 
									
										
										
										
											2012-07-03 23:33:16 +08:00
										 |  |  | add_library(wrap_lib STATIC ${wrap_srcs} ${wrap_headers})
 | 
					
						
							| 
									
										
										
										
											2013-02-05 05:28:39 +08:00
										 |  |  | target_link_libraries(wrap_lib ${WRAP_BOOST_LIBRARIES})
 | 
					
						
							| 
									
										
										
										
											2012-07-03 23:33:16 +08:00
										 |  |  | gtsam_assign_source_folders(${wrap_srcs} ${wrap_headers})
 | 
					
						
							| 
									
										
										
										
											2011-12-14 10:24:21 +08:00
										 |  |  | add_executable(wrap wrap.cpp)
 | 
					
						
							| 
									
										
										
										
											2012-07-14 05:55:00 +08:00
										 |  |  | target_link_libraries(wrap wrap_lib ${WRAP_BOOST_LIBRARIES})
 | 
					
						
							| 
									
										
										
										
											2012-01-31 13:28:03 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-07-02 21:03:00 +08:00
										 |  |  | # Set folder in Visual Studio
 | 
					
						
							|  |  |  | file(RELATIVE_PATH relative_path "${PROJECT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}")
 | 
					
						
							|  |  |  | set_target_properties(wrap_lib wrap PROPERTIES FOLDER "${relative_path}")
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-07-10 01:14:21 +08:00
										 |  |  | # Install wrap binary and export target
 | 
					
						
							| 
									
										
										
										
											2013-12-13 02:37:27 +08:00
										 |  |  | install(TARGETS wrap EXPORT GTSAM-exports DESTINATION bin)
 | 
					
						
							|  |  |  | list(APPEND GTSAM_EXPORTED_TARGETS wrap)
 | 
					
						
							|  |  |  | set(GTSAM_EXPORTED_TARGETS "${GTSAM_EXPORTED_TARGETS}" PARENT_SCOPE)
 | 
					
						
							| 
									
										
										
										
											2011-12-14 10:24:21 +08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-01-31 13:28:03 +08:00
										 |  |  | # Install matlab header
 | 
					
						
							| 
									
										
										
										
											2012-04-11 00:47:02 +08:00
										 |  |  | install(FILES matlab.h DESTINATION include/wrap)
 | 
					
						
							| 
									
										
										
										
											2012-01-31 13:28:03 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | # Build tests
 | 
					
						
							| 
									
										
										
										
											2014-02-13 14:34:31 +08:00
										 |  |  | add_subdirectory(tests)
 | 
					
						
							| 
									
										
										
										
											2012-01-31 13:28:05 +08:00
										 |  |  | 
 |