Rearranged matlab folders to avoid calling utility functions "examples"

release/4.3a0
Alex Cunningham 2012-06-07 20:09:54 +00:00
parent 61c7e8760b
commit d70622abe0
36 changed files with 40 additions and 33 deletions

View File

@ -131,6 +131,9 @@ if (GTSAM_BUILD_EXAMPLES)
add_subdirectory(examples)
endif(GTSAM_BUILD_EXAMPLES)
# Matlab toolbox
add_subdirectory(matlab)
# Build gtsam_unstable
if (GTSAM_BUILD_UNSTABLE)
add_subdirectory(gtsam_unstable)

View File

@ -30,24 +30,3 @@ foreach(example_src ${example_srcs} )
endforeach(example_src)
# Install matlab components
if (GTSAM_BUILD_WRAP)
if (GTSAM_INSTALL_MATLAB_TOOLBOX)
# Examples
if (GTSAM_INSTALL_MATLAB_EXAMPLES)
message(STATUS "Installing Matlab Toolbox Examples")
# Matlab files: *.m and *.fig
file(GLOB matlab_examples_m "${GTSAM_SOURCE_ROOT_DIR}/examples/matlab/*.m")
file(GLOB matlab_examples_fig "${GTSAM_SOURCE_ROOT_DIR}/examples/matlab/*.fig")
set(matlab_examples ${matlab_examples_m} ${matlab_examples_fig})
install(FILES ${matlab_examples} DESTINATION ${GTSAM_TOOLBOX_INSTALL_PATH}/gtsam/examples)
message(STATUS "Installing Matlab Toolbox Examples (Data)")
# Data files: *.graph and *.txt
file(GLOB matlab_examples_data_graph "${GTSAM_SOURCE_ROOT_DIR}/examples/Data/*.graph")
file(GLOB matlab_examples_data_txt "${GTSAM_SOURCE_ROOT_DIR}/examples/Data/*.txt")
set(matlab_examples_data ${matlab_examples_data_graph} ${matlab_examples_data_txt})
install(FILES ${matlab_examples_data} DESTINATION ${GTSAM_TOOLBOX_INSTALL_PATH}/gtsam/Data)
endif (GTSAM_INSTALL_MATLAB_EXAMPLES)
endif (GTSAM_INSTALL_MATLAB_TOOLBOX)
endif ()

37
matlab/CMakeLists.txt Normal file
View File

@ -0,0 +1,37 @@
# Install matlab components
if (GTSAM_BUILD_WRAP)
if (GTSAM_INSTALL_MATLAB_TOOLBOX)
# Utility functions
message(STATUS "Installing Matlab Utility Functions")
# Matlab files: *.m and *.fig
file(GLOB matlab_utils_m "${GTSAM_SOURCE_ROOT_DIR}/matlab/*.m")
file(GLOB matlab_utils_fig "${GTSAM_SOURCE_ROOT_DIR}/matlab/*.fig")
set(matlab_utils ${matlab_utils_m} ${matlab_utils_fig})
install(FILES ${matlab_utils} DESTINATION ${GTSAM_TOOLBOX_INSTALL_PATH}/gtsam)
# Tests
if (GTSAM_INSTALL_MATLAB_TESTS)
message(STATUS "Installing Matlab Toolbox Tests")
file(GLOB matlab_tests "${GTSAM_SOURCE_ROOT_DIR}/matlab/tests/*.m")
install(FILES ${matlab_tests} DESTINATION ${GTSAM_TOOLBOX_INSTALL_PATH}/gtsam/tests)
endif ()
# Examples
if (GTSAM_INSTALL_MATLAB_EXAMPLES)
message(STATUS "Installing Matlab Toolbox Examples")
# Matlab files: *.m and *.fig
file(GLOB matlab_examples_m "${GTSAM_SOURCE_ROOT_DIR}/matlab/examples/*.m")
file(GLOB matlab_examples_fig "${GTSAM_SOURCE_ROOT_DIR}/matlab/examples/*.fig")
set(matlab_examples ${matlab_examples_m} ${matlab_examples_fig})
install(FILES ${matlab_examples} DESTINATION ${GTSAM_TOOLBOX_INSTALL_PATH}/gtsam/examples)
message(STATUS "Installing Matlab Toolbox Examples (Data)")
# Data files: *.graph and *.txt
file(GLOB matlab_examples_data_graph "${GTSAM_SOURCE_ROOT_DIR}/examples/Data/*.graph")
file(GLOB matlab_examples_data_txt "${GTSAM_SOURCE_ROOT_DIR}/examples/Data/*.txt")
set(matlab_examples_data ${matlab_examples_data_graph} ${matlab_examples_data_txt})
install(FILES ${matlab_examples_data} DESTINATION ${GTSAM_TOOLBOX_INSTALL_PATH}/gtsam/Data)
endif ()
endif ()
endif ()

View File

@ -40,15 +40,3 @@ if (GTSAM_BUILD_TIMING)
"${tests_local_libs}" "gtsam-static;CppUnitLite" "${tests_exclude}" # Pass in linking and exclusion lists
${is_test})
endif (GTSAM_BUILD_TIMING)
# Install matlab components
if (GTSAM_BUILD_WRAP)
if (GTSAM_INSTALL_MATLAB_TOOLBOX)
# Tests
if (GTSAM_INSTALL_MATLAB_TESTS)
message(STATUS "Installing Matlab Toolbox Tests")
file(GLOB matlab_tests "${GTSAM_SOURCE_ROOT_DIR}/tests/matlab/*.m")
install(FILES ${matlab_tests} DESTINATION ${GTSAM_TOOLBOX_INSTALL_PATH}/gtsam/tests)
endif ()
endif ()
endif ()