You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are few things you want to know when you build `Dear ImGui`:
23
+
There are few things you want to know when you build `Dear ImGui`:<br>
23
24
ImGui comes with examples that already takes care of the way people should interact with the library, i.e `imgui_impl_win32.cpp`, `imgui_impl_vulkan.cpp`, `imgui_impl_osx.mm``imgui_impl_sdl.cpp` etc...
24
25
25
26
Basically the author of the library didn't want it to be dependent on any kind of graphic API's, therefore he expects that you'll provide your own implementation for that part(even though they're already exists in the `examples`).
26
27
27
28
That being said, before you build the library, you want to have a look at `CMakeOptions.cmake` file to see which options are available.
28
29
29
-
If you want to include one of the examples in the library build, when you generate the cmake project, you'll want to pass which graphic API you want to include in your build. Exmaple:
30
+
If you want to include one of the examples in the library build, when you generate the cmake project, you'll want to pass which graphic API you want to include in your build. Example:
30
31
```bash
31
32
cmake .. -DIMGUI_IMPL_DX11=ON
32
33
```
33
34
34
-
That would basically copy and include in your library build the following files:
35
+
That would basically copy and include in your library build the following files:<br>
and the headers will also be copied under `dist/include` directory.
37
38
@@ -40,10 +41,13 @@ and the headers will also be copied under `dist/include` directory.
40
41
41
42
If you run into any errors, please make sure you running with the correct environments(i.e `Developer Command Prompt for VS 2017`).
42
43
44
+
Another note that if you re-running cmake again with different options, make sure you remove `CMakeCache.txt` before you run cmake command again. Because the options would be cached in this file and won't refresh automatically.
43
45
44
46
## Motivation
45
47
46
-
I normally use [Conan C++ Package Manager](https://conan.io/) for building my projects and I wanted to have my [own recipe](https://github.com/giladreich/conan-imgui) for packaging ImGui with conan to simplify the usuage of the library.
48
+
ImGui library designed to be copied into the project internally, I therefore wanted to externalize it so I can reference to it from multiple projects instead of copying ImGui to each project.
49
+
50
+
I also use [Conan C++ Package Manager](https://conan.io/) for building my projects and I wanted to have my [own recipe](https://github.com/giladreich/conan-imgui) for packaging ImGui with conan to make it more portable across different projects.
47
51
48
52
There is already existing project for [conan-imgui](https://github.com/bincrafters/conan-imgui), but unfortunately it only provides the library as is without the option to enable examples.
49
53
@@ -54,7 +58,7 @@ I therefore got the motivation to make this CMake module so I can manage my own
0 commit comments