Disable alphashapes in Python bindings if no CGAL dev
authorDmitriy Morozov <dmitriy@mrzv.org>
Wed, 17 Jun 2009 16:02:52 -0700
branchdev
changeset 144 baa53970eb88
parent 143 b555e6587908
child 145 ee096f207dfb
Disable alphashapes in Python bindings if no CGAL
bindings/python/CMakeLists.txt
bindings/python/dionysus.cpp
--- a/bindings/python/CMakeLists.txt	Sun May 17 20:05:26 2009 -0700
+++ b/bindings/python/CMakeLists.txt	Wed Jun 17 16:02:52 2009 -0700
@@ -26,6 +26,7 @@
     link_libraries          (${CGAL_LIBRARY})                                            
 else                            (CGAL_FOUND)
     message(STATUS "CGAL not found, alphashape bindings will not be built")
+    add_definitions         (-DNO_CGAL)
 endif                       (CGAL_FOUND)
 
 add_library                 (_dionysus SHARED   ${sources})
--- a/bindings/python/dionysus.cpp	Sun May 17 20:05:26 2009 -0700
+++ b/bindings/python/dionysus.cpp	Wed Jun 17 16:02:52 2009 -0700
@@ -10,8 +10,10 @@
 void export_zigzag_persistence();
 
 void export_rips();
+#ifndef NO_CGAL
 void export_alphashapes2d();
 void export_alphashapes3d();
+#endif
 
 #ifdef LOGGING
 void            enable_log(std::string s)
@@ -30,8 +32,10 @@
     export_zigzag_persistence();
 
     export_rips();
+#ifndef NO_CGAL
     export_alphashapes2d();
     export_alphashapes3d();
+#endif
 
 #ifdef LOGGING
     bp::def("enable_log",           &enable_log);