I have downloaded imstk-unity from GitLab, and I want to enable the OpenHaptics and VRPN options. I followed these steps:
First, I cloned the imstk-unity repository from Git using the following command:
git clone https://gitlab.kitware.com/iMSTK/imstk-unity.git
Then, I updated the submodules within imstk-unity by running:
git submodule update
Next, to generate the CMakeLists.txt files, I updated and added the corresponding iMSTK files, which are located in another submodule, by running:
git submodule update --init --recursive
This will provide the necessary CMakeLists.txt file to compile the project with CMake.
After that, I created a folder named imstk-build inside imstk-unity, and from that directory, I ran the CMake compilation with the following command:
cmake -G “Visual Studio 17 2022” -A x64 ^
-DCMAKE_BUILD_TYPE=Release ^
-DIMSTK_BUILD_FOR_UNITY=ON ^
-DiMSTK_USE_VRPN=ON ^
-DVRPN_DIR=“C:\Users\evavi\Documents\TFG_P\vrpn” ^
-DiMSTK_USE_OpenHaptics=ON ^
-DOPENHAPTICS_DIR=“C:\OpenHaptics\Developer\3.5.0” ^
-DASSIMP_DIR=“C:\Users\evavi\Documents\TFG_P\assimp” ^
-DI_MSTK_DIR=“C:\Users\evavi\Documents\TFG_P\imstk-unity\build_imstk\install\lib\cmake\iMSTK-2.0” ^
C:\Users\evavi\Documents\TFG_P\imstk-unity\imstkSource~\iMSTK
Once CMake finished running, it showed a successful message in the terminal, but when I tried to compile with Visual Studio, I encountered the following error:
Custom build of “C:\Users\evavi\Documents\TFG_P\imstk-unity\build_imstk\CMakeFiles\7335b158368ffc7f5e6aa01809149273\Assimp-update.rule;C:\Users\evavi\Documents\TFG_P\imstk-unity\build_imstk\CMakeFiles\7335b158368ffc7f5e6aa01809149273\Assimp-patch.rule;C:\Users\evavi\Documents\TFG_P\imstk-unity\build_imstk\CMakeFiles\7335b158368ffc7f5e6aa01809149273\Assimp-configure.rule;C:\Users\evavi\Documents\TFG_P\imstk-unity\build_imstk\CMakeFiles\7335b158368ffc7f5e6aa01809149273\Assimp-build.rule;C:\Users\evavi\Documents\TFG_P\imstk-unity\build_imstk\CMakeFiles\7335b158368ffc7f5e6aa01809149273\Assimp-install.rule;C:\Users\evavi\Documents\TFG_P\imstk-unity\build_imstk\CMakeFiles\173151dafe26758b6ec661d5a2252578\Assimp-complete.rule;C:\Users\evavi\Documents\TFG_P\imstk-unity\build_imstk\CMakeFiles\61ff060cf0d5f304acc6ba4f6ab13cfc\Assimp.rule;C:\Users\evavi\Documents\TFG_P\imstk-unity\ImstkSource~\iMSTK\CMake\External\CMakeLists.txt” finished with code 1.
This error repeats with the dependencies: Assimp, iMSTK, VTK, g3log, tbb, and uncrustify.