Closed vittorioromeo closed 1 month ago
Hi, I'm glad you're finding the library useful!
Unfortunately I'm not an expert in cmake but I have some guesses about what might be going on here. I would expect your SFML fork to have installed cpptrace to C:/OHWorkspace/SFML/build/installed
along with SFML (and any dependencies cpptrace brings in, like libdwarf and zstd on linux or windows with mingw). -DSFML_DIR
tells cmake where to find the SFML install but it probably doesn't know where to look for cpptrace or additional dependencies. It may just work if you use -DCMAKE_PREFIX_PATH=C:/OHWorkspace/SFML/build/installed
, otherwise -DCPPTRACE_DIR=C:/OHWorkspace/SFML/build/installed -DDWARF_DIR=C:/OHWorkspace/SFML/build/installed -DZSTD_DIR=C:/OHWorkspace/SFML/build/installed
may be needed. This path propagation could be done automatically in SFMLConfig.cmake.in as well:
set(CPPTRACE_DIR ${SFML_DIR})
...
I hope this helps, if it doesn't I'd be happy to look more!
Hi, I haven't heard back so I'll close this for now but please let me know if you have any other questions!
I have started using
cpptrace
in my fork of SFML, which has been immensely helpful for assertions and error logging -- great work!The way I use it is as follows:
This works fine when building SFML and its test suite in isolation. However, I have another project,
imgui-sfml
, which depends on my fork of SFML:After building SFML locally and installing it with
ninja install
, I directimgui-sfml
to its installation folder:This fails with the following error message:
I attempted to fix this by exporting
cpptrace-lib
fromSFML/CMakeLists.txt
:But then I get the same error message when trying to build
imgui-sfml
, but forlibdwarf
:What is the proper way of exporting
cpptrace
and propagating its dependencies?