2017-03-19 03:52:08 +08:00
|
|
|
from distutils.core import setup
|
|
|
|
|
from distutils.extension import Extension
|
|
|
|
|
from Cython.Build import cythonize
|
|
|
|
|
import eigency
|
2017-03-21 05:16:17 +08:00
|
|
|
import sys
|
|
|
|
|
|
|
|
|
|
# so that it can find the wrapped gtsam package
|
|
|
|
|
sys.path.append("..")
|
2017-03-19 03:52:08 +08:00
|
|
|
|
2017-03-22 03:02:21 +08:00
|
|
|
libc_flag = []
|
|
|
|
|
if sys.platform == "darwin":
|
|
|
|
|
libc_flag = ["-stdlib=libc++"]
|
|
|
|
|
|
2017-03-19 03:52:08 +08:00
|
|
|
setup(
|
|
|
|
|
ext_modules=cythonize(Extension(
|
|
|
|
|
"gtsam_unstable",
|
|
|
|
|
sources=["gtsam_unstable.pyx"],
|
|
|
|
|
include_dirs = ["${CMAKE_SOURCE_DIR}", "${CMAKE_BINARY_DIR}",
|
|
|
|
|
"${CMAKE_SOURCE_DIR}/gtsam/3rdparty/Eigen"
|
|
|
|
|
] + eigency.get_includes(include_eigen=False),
|
|
|
|
|
libraries=['gtsam', 'gtsam_unstable'],
|
|
|
|
|
library_dirs=["${GTSAM_DIR}/../../"],
|
|
|
|
|
language="c++",
|
2017-03-22 03:02:21 +08:00
|
|
|
extra_compile_args=["-std=c++11"] + libc_flag,
|
|
|
|
|
extra_link_args=libc_flag)),
|
2017-03-19 03:52:08 +08:00
|
|
|
)
|
|
|
|
|
|