Fixes for multiple-project builds where GTSAM is a subdirectory in a larger build
							parent
							
								
									ce1c654737
								
							
						
					
					
						commit
						af18d11df6
					
				| 
						 | 
					@ -216,7 +216,7 @@ endif()
 | 
				
			||||||
configure_file(gtsam/3rdparty/gtsam_eigen_includes.h.in gtsam/3rdparty/gtsam_eigen_includes.h)
 | 
					configure_file(gtsam/3rdparty/gtsam_eigen_includes.h.in gtsam/3rdparty/gtsam_eigen_includes.h)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Install the configuration file for Eigen
 | 
					# Install the configuration file for Eigen
 | 
				
			||||||
install(FILES ${CMAKE_BINARY_DIR}/gtsam/3rdparty/gtsam_eigen_includes.h DESTINATION include/gtsam/3rdparty)
 | 
					install(FILES ${PROJECT_BINARY_DIR}/gtsam/3rdparty/gtsam_eigen_includes.h DESTINATION include/gtsam/3rdparty)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
###############################################################################
 | 
					###############################################################################
 | 
				
			||||||
| 
						 | 
					@ -270,8 +270,8 @@ include_directories(BEFORE
 | 
				
			||||||
  gtsam/3rdparty/metis-5.1.0/include
 | 
					  gtsam/3rdparty/metis-5.1.0/include
 | 
				
			||||||
  gtsam/3rdparty/metis-5.1.0/libmetis
 | 
					  gtsam/3rdparty/metis-5.1.0/libmetis
 | 
				
			||||||
  gtsam/3rdparty/metis-5.1.0/GKlib
 | 
					  gtsam/3rdparty/metis-5.1.0/GKlib
 | 
				
			||||||
  ${CMAKE_SOURCE_DIR}
 | 
					  ${PROJECT_SOURCE_DIR}
 | 
				
			||||||
  ${CMAKE_BINARY_DIR} # So we can include generated config header files
 | 
					  ${PROJECT_BINARY_DIR} # So we can include generated config header files
 | 
				
			||||||
  CppUnitLite)
 | 
					  CppUnitLite)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if(MSVC)
 | 
					if(MSVC)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -83,8 +83,8 @@ set(gtsam_srcs
 | 
				
			||||||
configure_file(config.h.in config.h)
 | 
					configure_file(config.h.in config.h)
 | 
				
			||||||
set(library_name GTSAM) # For substitution in dllexport.h.in
 | 
					set(library_name GTSAM) # For substitution in dllexport.h.in
 | 
				
			||||||
configure_file("${PROJECT_SOURCE_DIR}/cmake/dllexport.h.in" "dllexport.h")
 | 
					configure_file("${PROJECT_SOURCE_DIR}/cmake/dllexport.h.in" "dllexport.h")
 | 
				
			||||||
list(APPEND gtsam_srcs "${CMAKE_BINARY_DIR}/gtsam/config.h" "${CMAKE_BINARY_DIR}/gtsam/dllexport.h")
 | 
					list(APPEND gtsam_srcs "${PROJECT_BINARY_DIR}/gtsam/config.h" "${PROJECT_BINARY_DIR}/gtsam/dllexport.h")
 | 
				
			||||||
install(FILES "${CMAKE_BINARY_DIR}/gtsam/config.h" "${CMAKE_BINARY_DIR}/gtsam/dllexport.h" DESTINATION include/gtsam)
 | 
					install(FILES "${PROJECT_BINARY_DIR}/gtsam/config.h" "${PROJECT_BINARY_DIR}/gtsam/dllexport.h" DESTINATION include/gtsam)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Versions
 | 
					# Versions
 | 
				
			||||||
set(gtsam_version   ${GTSAM_VERSION_MAJOR}.${GTSAM_VERSION_MINOR}.${GTSAM_VERSION_PATCH})
 | 
					set(gtsam_version   ${GTSAM_VERSION_MAJOR}.${GTSAM_VERSION_MINOR}.${GTSAM_VERSION_PATCH})
 | 
				
			||||||
| 
						 | 
					@ -135,7 +135,7 @@ endif(GTSAM_BUILD_SHARED_LIBRARY)
 | 
				
			||||||
# Set dataset paths
 | 
					# Set dataset paths
 | 
				
			||||||
set_property(SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/slam/dataset.cpp"
 | 
					set_property(SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/slam/dataset.cpp"
 | 
				
			||||||
    APPEND PROPERTY COMPILE_DEFINITIONS
 | 
					    APPEND PROPERTY COMPILE_DEFINITIONS
 | 
				
			||||||
	"SOURCE_TREE_DATASET_DIR=\"${CMAKE_SOURCE_DIR}/examples/Data\""
 | 
						"SOURCE_TREE_DATASET_DIR=\"${PROJECT_SOURCE_DIR}/examples/Data\""
 | 
				
			||||||
	"INSTALLED_DATASET_DIR=\"${GTSAM_TOOLBOX_INSTALL_PATH}/gtsam_examples/Data\"")
 | 
						"INSTALLED_DATASET_DIR=\"${GTSAM_TOOLBOX_INSTALL_PATH}/gtsam_examples/Data\"")
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
# Special cases
 | 
					# Special cases
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue