Closed wpumacay closed 1 year ago
Hello @wpumacay ! See https://github.com/ami-iit/meshcat-cpp/pull/1#issuecomment-1412037838 for two possible ways of solving this problem.
Thanks!, I'll try it out :+1: .
@wpumacay if it is ok I would keep the issue open so it is clear that this is an open problem, and we can close the issue once one solution is merged.
@wpumacay and @traversaro https://github.com/ami-iit/meshcat-cpp/pull/14 should fix this issue
First of all, thanks for making this package :smiley: . I'm trying to integrate Meshcat as visualizer for an application I'm developing. I got the example file working when using the library after installation; everything so far works right. However, I'm running into some issues when trying to use the library without installing it, and instead using
FetchContent
to grab the source of the library and usingadd_subdirectory
to include the project into my CMake workflow.This also happens if I try to build the example file along the library, and try to run the example, getting the following error:
I noticed that the
index.html
file in themisc
folder at the root of the project should be served, but the location used actually comes from the fileFindResource.cpp.in
, which when installing points to the installation location (e.g./usr/local/share/MeshcatCpp/misc
). This works when using the library after installing it. However, if we'd like to use the example that is being compiled along the library without installing it, I'd keep running into the error mentioned before.Is it possible to update the
FindResource.cpp.in
or a similar file(s) to handle the case when we don't want to install the library into our system?.