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])