From c861e80a053c1db1c562f7ccccceae89b354300a Mon Sep 17 00:00:00 2001 From: Daniele Panozzo Date: Tue, 6 Oct 2015 15:48:55 +0200 Subject: [PATCH] fixes for python on linux Former-commit-id: 9f467b8009778b237cb3c281def485c2e833e909 --- python/CMakeLists.txt | 3 ++- python/python.cpp | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 55812e0f6..9cd039cf8 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -89,6 +89,8 @@ if (OPENGL_FOUND) include_directories("../external/nanogui/ext/nanovg/src") list(APPEND SHARED_LIBRARIES "nanogui" ${OPENGL_LIBRARIES}) + list(APPEND SHARED_SOURCES "py_igl_viewer.cpp") + endif (OPENGL_FOUND) # include comiso if available @@ -148,7 +150,6 @@ add_library(igl SHARED py_vector.cpp py_igl.cpp py_doc.cpp - py_igl_viewer.cpp ${SHARED_SOURCES} ) diff --git a/python/python.cpp b/python/python.cpp index f81fa6c34..b86a69f08 100644 --- a/python/python.cpp +++ b/python/python.cpp @@ -5,7 +5,10 @@ extern void python_export_vector(py::module &); extern void python_export_igl(py::module &); + +#ifdef PY_VIEWER extern void python_export_igl_viewer(py::module &); +#endif #ifdef PY_COMISO extern void python_export_igl_comiso(py::module &); @@ -17,7 +20,11 @@ PYTHON_PLUGIN(igl) { python_export_vector(m); python_export_igl(m); + + + #ifdef PY_VIEWER python_export_igl_viewer(m); + #endif #ifdef PY_COMISO python_export_igl_comiso(m);