Comments (4)
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.
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.
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.
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)
- [bug] `conan list` filtering option asks users to use scope patterns when those don't work in that context HOT 2
- [question] Set cmake_find_mode for all deps in CMakeDeps [conan 2] HOT 2
- [feature] Option to suppress generation of script files HOT 2
- [bug] Initial setup for Conan test suite is not automated or documented HOT 3
- [question] disable package revisions HOT 3
- [bug] `conan source` does not actually get `global.conf`'s `core.` confs HOT 1
- [question] Install a binary package without matching the compiler version HOT 3
- [question] preset name != profile name HOT 4
- [question] Include jinja profile template into another HOT 7
- [question] How to disable compatilibity? HOT 5
- [question] CMAKE_INSTALL_PREFIX in toolchain - local/cache build difference [conan 2] HOT 3
- [feature] Introduce os.version or os=Ubuntu in profiles HOT 2
- [question] PUBLIC compile definition not propagated HOT 3
- [question] How to access a value defined in the `[conf]` section of a profile? HOT 1
- [feature] Add properties to MakeDeps generator HOT 6
- [question] `conan create` complains about `settings.compiler.cppstd` HOT 7
- [question] Delete the Build Folder Beforehand if Exists HOT 5
- [bug] detect_api.detect_msvc_compiler() returns an incorrect version HOT 1
- [question] How to use source_buildenv HOT 5
- [question] Is it possible to check arguments passed in the CLI in the profiles? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from conan.