如何访问imgui conan包中res文件夹下的文件?

How to access the files in the res folder in the imgui conan package?

我正在使用 conan 来处理依赖项,对于那些熟悉 imgui 的人来说,它提供了一系列您可以包含的后端。

当您查看 conan 包时,可以在 res 文件夹中找到它们。

我需要告诉介子在该目录中包含文件,我该如何指示介子如何找到这些文件?

我是柯南新手,不知道有没有更好的解决办法, 但我的 conanfile.txt

中有以下内容
[imports]
res, *glfw.* -> .

这会将带有 header 的绑定文件夹和构建目录中的源文件放在一起

然后我在 CMakeLists.txt 和
中使用它们 "${CMAKE_CURRENT_BINARY_DIR}/bindings/imgui_impl_glfw.cpp"

在 .py 脚本中,可以执行如下操作:

  def imports(self):
        self.copy("*.cpp", dst="ext/imgui", src=self.deps_cpp_info["imgui"].resdirs[0])
        self.copy("*.hpp", dst="ext/imgui", src=self.deps_cpp_info["imgui"].resdirs[0])
        self.copy("*.h", dst="ext/imgui", src=self.deps_cpp_info["imgui"].resdirs[0])