1

I am using conan to handle dependencies, for those of you familiar with imgui, it provides a series of backends you can include.

When you look at the conan package these are found in the res folder.

I need to tell meson to include files in that directory, how do I instruct meson how to find these files?

Makogan
  • 8,208
  • 7
  • 44
  • 112

1 Answers1

1

I am new to conan so i dont know if there is a better solution, but i have the following in my conanfile.txt

[imports]
res, *glfw.* -> .

which puts a bindings folder with the header and the source file in the build directory

then i use them in my CMakeLists.txt with
"${CMAKE_CURRENT_BINARY_DIR}/bindings/imgui_impl_glfw.cpp"

In a .py script one would do somehting like the following:

  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])
Makogan
  • 8,208
  • 7
  • 44
  • 112
st4ll1
  • 26
  • 1
  • I discovered how to do it by reading the documentation on the imports method for a conan.py script. – Makogan May 04 '22 at 08:16