Define dataset directory for Python package
parent
39aeae657e
commit
13d33e0f51
|
|
@ -428,6 +428,14 @@ add_subdirectory(CppUnitLite)
|
|||
if(GTSAM_BUILD_PYTHON)
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/wrap/cmake")
|
||||
add_subdirectory(python)
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
# Common directory which always has write access
|
||||
# This is because the exact location of the Python installation may vary
|
||||
# depending on various factors such as python version and use of virtual envs.
|
||||
set(GTSAM_PYTHON_DATASET_DIR "/tmp/gtsam_example_data")
|
||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
set(GTSAM_PYTHON_DATASET_DIR "$ENV{LOCALAPPDATA}/gtsam_example_data")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Build GTSAM library
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
// Paths to example datasets distributed with GTSAM
|
||||
#define GTSAM_SOURCE_TREE_DATASET_DIR "@GTSAM_SOURCE_DIR@/examples/Data"
|
||||
#define GTSAM_INSTALLED_DATASET_DIR "@GTSAM_TOOLBOX_INSTALL_PATH@/gtsam_examples/Data"
|
||||
#define GTSAM_PYTHON_DATASET_DIR "@GTSAM_PYTHON_DATASET_DIR"
|
||||
|
||||
// Whether GTSAM is compiled to use quaternions for Rot3 (otherwise uses rotation matrices)
|
||||
#cmakedefine GTSAM_USE_QUATERNIONS
|
||||
|
|
|
|||
Loading…
Reference in New Issue