Skip to content

Commit de0ac99

Browse files
committed
Revert "update plugin config files"
This reverts commit 7b520c3.
1 parent 8896b98 commit de0ac99

3 files changed

Lines changed: 16 additions & 14 deletions

File tree

src/InfinyToolkit/config.h.in

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,11 @@
2020
#pragma once
2121

2222
#include <sofa/config.h>
23-
#include <sofa/config/sharedlibrary_defines.h>
24-
25-
#define INFINYTOOLKIT_VERSION @PROJECT_VERSION@
23+
#define PLUGIN_VERSION @PROJECT_VERSION@
2624

2725
#ifdef SOFA_BUILD_INFINYTOOLKIT
2826
# define SOFA_TARGET @PROJECT_NAME@
2927
# define SOFA_INFINYTOOLKIT_API SOFA_EXPORT_DYNAMIC_LIBRARY
3028
#else
3129
# define SOFA_INFINYTOOLKIT_API SOFA_IMPORT_DYNAMIC_LIBRARY
3230
#endif
33-
34-
namespace sofa::infinytoolkit
35-
{
36-
constexpr const char* MODULE_NAME = "@PROJECT_NAME@";
37-
constexpr const char* MODULE_VERSION = "@PROJECT_VERSION@";
38-
} // namespace sofa::infinytoolkit

src/InfinyToolkit/initInfinyToolkit.cpp

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
#include <sofa/core/ObjectFactory.h>
2323
#include <sofa/helper/system/PluginManager.h>
2424

25+
using sofa::core::ObjectFactory;
26+
2527
namespace sofa::infinytoolkit
2628
{
2729
// Haptic and Carving
@@ -56,6 +58,14 @@ extern void registerMotionReplayController(sofa::core::ObjectFactory* factory);
5658

5759

5860

61+
} // namespace sofa::infinytoolkit
62+
63+
64+
namespace sofa::component
65+
{
66+
67+
using namespace sofa::infinytoolkit;
68+
5969
//Here are just several convenient functions to help user to know what contains the plugin
6070
extern "C" {
6171
SOFA_INFINYTOOLKIT_API void initExternalModule();
@@ -85,12 +95,12 @@ void initExternalModule()
8595

8696
const char* getModuleName()
8797
{
88-
return MODULE_NAME;
98+
return sofa_tostring(SOFA_TARGET);
8999
}
90100

91101
const char* getModuleVersion()
92102
{
93-
return MODULE_VERSION;
103+
return sofa_tostring(PLUGIN_VERSION);
94104
}
95105

96106
const char* getModuleLicense()
@@ -137,4 +147,4 @@ void registerObjects(sofa::core::ObjectFactory* factory)
137147
registerMotionReplayController(factory);
138148
}
139149

140-
} // namespace sofa::infinytoolkit
150+
} // namespace sofa::component

src/InfinyToolkit/initInfinyToolkit.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
#pragma once
2121
#include <InfinyToolkit/config.h>
2222

23-
namespace sofa::infinytoolkit
23+
namespace sofa::component
2424
{
2525

2626
void SOFA_INFINYTOOLKIT_API initInfinyToolkit();
2727

28-
} // namespace sofa::infinytoolkit
28+
} // namespace sofa::component

0 commit comments

Comments
 (0)