Building on Windows
1. In the CMake GUI, with the source code path still pointing out the source code of SOFA, set the variable SOFA_EXTERNAL_DIRECTORIES to the path of your SoftRobots plugin (and SoftRobots.Inverse if needed).
2. Skip this step if you are not concerned by the Inverse part. The plugin SoftRobots.Inverse has a dependency to the qpOASES library.
Before you can call nmake, you have to activate the build environment of Visual Studio. Example with VisualStudio 2015 x64:
C:\Users\sofa>"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64
Use CMake to configure the compilation and then run nmake.
cd SoftRobots.Inverse/extilbs/qpOASES-3.2.0 cmake -G "NMake Makefiles" . nmake
(you may need to move the output files from the “libs” directory to the “bin” directory if you have cmake errors when you activate the SoftRobots.Inverse plugin)
If necessary, see https://projects.coin-or.org/qpOASES/wiki/QpoasesInstallation.
3. Finally, you can start the compilation. If you are using VS, go into the build directory and open the solution. If you don’t want to build SOFA in debug mode, do not forget to change the option on top of the VS window.
4. You can now test the plugin by using
cd YOUR_BUILD_DIR/bin runSofa PATH_TO_SOFA/applications/plugins/SoftRobots/docs/examples/AN_EXAMPLE runSofa PATH_TO_SOFA/applications/plugins/SoftRobots/docs/tutorials/AN_EXAMPLE
cd YOUR_BUILD_DIR/bin runSofa PATH_TO_SOFA/applications-dev/plugins/SoftRobots.Inverse/docs/examples/AN_EXAMPLE
NB: Most of the examples provided in the SoftRobots and SoftRobots.Inverse plugins require the SofaPython plugin. This plugin is enabled by default.
The runSofa application has a plugin manager. If you want a plugin library to be loaded by the application you have two options:
- Add to your scene a “RequiredPlugin” component (see the modeler application for more information, or the examples provided in the plugin)
- Manually add it using the “Edit/plugin manager” of the runSofa application