Skip to content

Commit e8d2bf3

Browse files
authored
Merge pull request #40 from olivier-roussel/fix_image_plugin_use
Fix compilation when not using `image` plugin
2 parents 81c754e + 99d7293 commit e8d2bf3

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

src/CGALPlugin/config.h.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525

2626
#define CGALPLUGIN_MAJOR_VERSION ${CGALPLUGIN_MAJOR_VERSION}
2727
#define CGALPLUGIN_MINOR_VERSION ${CGALPLUGIN_MINOR_VERSION}
28+
#cmakedefine CGALPLUGIN_HAVE_IMAGE
2829

2930
#ifdef SOFA_BUILD_CGALPLUGIN
3031
# define SOFA_TARGET CGALPlugin
@@ -37,4 +38,4 @@ namespace cgal
3738
{
3839
constexpr const char* MODULE_NAME = "@PROJECT_NAME@";
3940
constexpr const char* MODULE_VERSION = "@PROJECT_VERSION@";
40-
} // namespace cgal
41+
} // namespace cgal

src/CGALPlugin/initCGALPlugin.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@ namespace cgal
3636
}
3737

3838
extern void registerMeshGenerationFromPolyhedron(sofa::core::ObjectFactory* factory);
39+
40+
#ifdef CGALPLUGIN_HAVE_IMAGE
3941
extern void registerMeshGenerationFromImage(sofa::core::ObjectFactory* factory);
42+
#endif
4043
extern void registerDecimateMesh(sofa::core::ObjectFactory* factory);
4144
extern void registerTriangularConvexHull3D(sofa::core::ObjectFactory* factory);
4245
extern void registerRefine2DMesh(sofa::core::ObjectFactory* factory);
@@ -97,7 +100,9 @@ void registerObjects(sofa::core::ObjectFactory* factory)
97100
cgal::registerUpsamplePointCloud(factory);
98101
cgal::registerBooleanOperations(factory);
99102
registerMeshGenerationFromPolyhedron( factory);
103+
#ifdef CGALPLUGIN_HAVE_IMAGE
100104
registerMeshGenerationFromImage( factory);
105+
#endif
101106
registerDecimateMesh( factory);
102107
registerTriangularConvexHull3D( factory);
103108
registerRefine2DMesh( factory);

0 commit comments

Comments
 (0)