From 77fb84b9426a88975a97e68de67ae44a3cc7ba4c Mon Sep 17 00:00:00 2001 From: Duy-Nguyen Ta Date: Sun, 23 Jul 2017 15:07:00 -0400 Subject: [PATCH] Option to use system eigency. Copy eigency to build folder so cython can find its header without modifying PYTHONPATH --- cython/CMakeLists.txt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/cython/CMakeLists.txt b/cython/CMakeLists.txt index 36098171e..39112c607 100644 --- a/cython/CMakeLists.txt +++ b/cython/CMakeLists.txt @@ -3,7 +3,15 @@ include(GtsamCythonWrap) # Create the cython toolbox for the gtsam library if (GTSAM_INSTALL_CYTHON_TOOLBOX) - add_subdirectory(eigency) + # build and include eigency + if (GTSAM_USE_SYSTEM_EIGENCY) + find_package(Eigency REQUIRED) + include_directories(${EIGENCY_INCLUDE_DIRS}) + else() + add_subdirectory(eigency) + include_directories(eigency) + file(COPY eigency DESTINATION ".") + endif() # wrap gtsam wrap_and_install_library_cython("../gtsam.h" # interface_header