Git Product home page Git Product logo

Comments (4)

AbrilRBS avatar AbrilRBS commented on July 22, 2024 1

Checking the recipe, we do package the files you're looking for, but are not included in the include paths by default, they are in the res folder under the bindings subdirectory

Checking https://github.com/ocornut/imgui/wiki/Getting-Started#setting-up-dear-imgui--backends it seems like the recipe could directly add all backend files to the include paths, we'll take a look into it, see if it makes sense to make it less suprising

Edit: Oops just saw your last message, yes! That seems like the current approach to properly use the backends, we'll see if we can ease that pain in the future :)

from conan.

AbrilRBS avatar AbrilRBS commented on July 22, 2024

Hi @kahlenberg thanks a lot for taking the time to report your issue, we appreciate it

I think this would not be a bug, but expected behaviour. The line self.requires("imgui/1.90.5", override=True) does not create a dependency on imgui by itself due to the override trait, it only means that if imgui is found in the dependency graph, its version should be overriden to that one, not that this package should dependend on that version by force.

You might be looking for the force=True trait, which does what you'd expect in this case: Create the direct dependency, and force it to be this version.

Note however that using these utilities to solve problems with the graph (if this is the case at all!) is not the recommended approach, and should only be used to temporally allow the builds to proceed while the versions get fixed in the problematic nodes in the graph :)

Hope this helps!

from conan.

kahlenberg avatar kahlenberg commented on July 22, 2024

Hi, Thank you for answer. I removed override=True and removed and created build directory, run conan install and conan build again, it is still the same error.

from conan.

kahlenberg avatar kahlenberg commented on July 22, 2024

Ok, I found it.
Some imgui source files needs to be compiled with the project and source and header files need to be copied to project directory.
conanfile.py:

...
    def generate(self):
        copy(self, "*glfw*", os.path.join(self.dependencies["imgui"].package_folder,
             "res", "bindings"), os.path.join(self.source_folder, "bindings"))
        copy(self, "*opengl3*", os.path.join(self.dependencies["imgui"].package_folder,
             "res", "bindings"), os.path.join(self.source_folder, "bindings"))
        deps = CMakeDeps(self)
        deps.generate()
        tc = CMakeToolchain(self)
        tc.generate()
...

CMakeLists.txt:

....
# Include the directory for header files
include_directories(${PROJECT_SOURCE_DIR}/include ${PROJECT_SOURCE_DIR}/bindings)

# Find all .cpp files in the src directory
file(GLOB SRC_FILES ${PROJECT_SOURCE_DIR}/src/*.cpp)
file(GLOB IMGUI_BINDINGS_FILES ${PROJECT_SOURCE_DIR}/bindings/*.cpp)
....

add_executable(${PROJECT_NAME} ${SRC_FILES} ${IMGUI_BINDINGS_FILES})
...

from conan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.