Changes to do hierarchical build
parent
f7182eeaf6
commit
af04dce120
|
|
@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 2.6)
|
||||||
|
|
||||||
# Set the version number for the library
|
# Set the version number for the library
|
||||||
set (GTSAM_VERSION_MAJOR 2)
|
set (GTSAM_VERSION_MAJOR 2)
|
||||||
set (GTSAM_VERSION_MINOR 3)
|
set (GTSAM_VERSION_MINOR 4)
|
||||||
set (GTSAM_VERSION_PATCH 0)
|
set (GTSAM_VERSION_PATCH 0)
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -153,7 +153,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)
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
@ -169,8 +169,8 @@ include_directories(BEFORE ${Boost_INCLUDE_DIR})
|
||||||
include_directories(BEFORE
|
include_directories(BEFORE
|
||||||
gtsam/3rdparty/UFconfig
|
gtsam/3rdparty/UFconfig
|
||||||
gtsam/3rdparty/CCOLAMD/Include
|
gtsam/3rdparty/CCOLAMD/Include
|
||||||
${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)
|
||||||
|
|
|
||||||
|
|
@ -134,7 +134,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
|
||||||
|
|
@ -145,7 +145,7 @@ endif()
|
||||||
|
|
||||||
# Generate and install config file
|
# Generate and install config file
|
||||||
configure_file(config.h.in config.h)
|
configure_file(config.h.in config.h)
|
||||||
install(FILES ${CMAKE_BINARY_DIR}/gtsam/config.h DESTINATION include/gtsam)
|
install(FILES ${PROJECT_BINARY_DIR}/gtsam/config.h DESTINATION include/gtsam)
|
||||||
|
|
||||||
# Create the matlab toolbox for the gtsam library
|
# Create the matlab toolbox for the gtsam library
|
||||||
if (GTSAM_INSTALL_MATLAB_TOOLBOX)
|
if (GTSAM_INSTALL_MATLAB_TOOLBOX)
|
||||||
|
|
@ -154,11 +154,11 @@ if (GTSAM_INSTALL_MATLAB_TOOLBOX)
|
||||||
|
|
||||||
# Choose include flags depending on build process
|
# Choose include flags depending on build process
|
||||||
set(MEX_INCLUDE_ROOT ${GTSAM_SOURCE_ROOT_DIR})
|
set(MEX_INCLUDE_ROOT ${GTSAM_SOURCE_ROOT_DIR})
|
||||||
set(MEX_LIB_ROOT ${CMAKE_BINARY_DIR}) # FIXME: is this used?
|
set(MEX_LIB_ROOT ${PROJECT_BINARY_DIR}) # FIXME: is this used?
|
||||||
set(GTSAM_LIB_DIR ${MEX_LIB_ROOT}/gtsam) # FIXME: is this used?
|
set(GTSAM_LIB_DIR ${MEX_LIB_ROOT}/gtsam) # FIXME: is this used?
|
||||||
|
|
||||||
# Generate, build and install toolbox
|
# Generate, build and install toolbox
|
||||||
set(mexFlags ${GTSAM_BUILD_MEX_BINARY_FLAGS} -I${MEX_INCLUDE_ROOT} -I${Boost_INCLUDE_DIR} -I${CMAKE_BINARY_DIR})
|
set(mexFlags ${GTSAM_BUILD_MEX_BINARY_FLAGS} -I${MEX_INCLUDE_ROOT} -I${Boost_INCLUDE_DIR} -I${PROJECT_BINARY_DIR})
|
||||||
if("${gtsam-default}" STREQUAL "gtsam-static")
|
if("${gtsam-default}" STREQUAL "gtsam-static")
|
||||||
list(APPEND mexFlags -DGTSAM_IMPORT_STATIC)
|
list(APPEND mexFlags -DGTSAM_IMPORT_STATIC)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue