Skip to content

Commit 6c2e8cd

Browse files
committed
fix compilation with CMake var REGISTRATION_USES_IMAGE
1 parent 2a00eed commit 6c2e8cd

3 files changed

Lines changed: 11 additions & 1 deletion

File tree

src/Registration/RegistrationExporter.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
* Authors: The SOFA Team and external contributors (see Authors.txt) *
1919
* *
2020
* Contact information: contact@sofa-framework.org *
21-
******************************************************************************/#include "RegistrationExporter.h"
21+
******************************************************************************/
22+
#include "RegistrationExporter.h"
2223

2324
#include <sstream>
2425
#include <iomanip>

src/Registration/config.h.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#cmakedefine01 REGISTRATION_HAVE_SOFA_GL
3131

3232
#cmakedefine01 REGISTRATION_HAVE_IMAGE
33+
#cmakedefine REGISTRATION_USES_IMAGE
3334

3435
#ifdef SOFA_BUILD_REGISTRATION
3536
# define SOFA_TARGET Registration

src/Registration/initRegistration.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
* Contact information: contact@sofa-framework.org *
2121
******************************************************************************/
2222
#include <Registration/config.h>
23+
#include <sofa/core/ObjectFactory.h>
24+
#include <sofa/helper/system/PluginManager.h>
2325

2426
namespace sofa::component
2527
{
@@ -28,11 +30,15 @@ namespace sofa::component
2830
namespace sofa::component::engine
2931
{
3032
extern void registerGroupwiseRegistrationEngine(sofa::core::ObjectFactory* factory);
33+
#ifdef REGISTRATION_USES_IMAGE
3134
extern void registerIntensityProfileCreator(sofa::core::ObjectFactory* factory);
35+
#endif
3236
}
3337
namespace sofa::component::forcefield
3438
{
39+
#ifdef REGISTRATION_USES_IMAGE
3540
extern void registerIntensityProfileRegistrationForceField(sofa::core::ObjectFactory* factory);
41+
#endif
3642
extern void registerClosestPointRegistrationForceField(sofa::core::ObjectFactory* factory);
3743
}
3844
namespace sofa::component::interactionforcefield
@@ -94,8 +100,10 @@ namespace registration
94100
{
95101
sofa::component::registerInertiaAlign(factory);
96102
sofa::component::engine::registerGroupwiseRegistrationEngine( factory);
103+
#ifdef REGISTRATION_USES_IMAGE
97104
sofa::component::engine::registerIntensityProfileCreator(factory);
98105
sofa::component::forcefield::registerIntensityProfileRegistrationForceField(factory);
106+
#endif
99107
sofa::component::forcefield::registerClosestPointRegistrationForceField(factory);
100108
sofa::component::interactionforcefield::registerRegistrationContactForceField(factory);
101109
sofa::component::misc::registerRegistrationExporter(factory);

0 commit comments

Comments
 (0)