@@ -8,21 +8,27 @@ A template project using [Imgui](external/imgui) as graphical user interface ([g
8
8
For more details about the Apach 2.0 licence, visit [ tldrlegal.com] ( https://tldrlegal.com/license/apache-license-2.0-(apache-2.0) ) .
9
9
For more details about the MIT licence, visit [ tldrlegal.com] ( https://tldrlegal.com/license/mit-license )
10
10
11
+ Here is a screenshot of the application running a custom node editor based on [ imnodes] ( https://github.com/Nelarius/imnodes/tree/d88f99125bb72cdb71b4c27ff6eb7f318d89a4c5 ) :
12
+ ![ node_editor] ( assets/screenshots/node_editor.png )
13
+
11
14
## Dependencies
12
15
13
16
The code is build to run with the following libraries (included in the repository under [ external] ( external/ ) ):
14
17
15
18
- [ OpenGL] ( https://www.opengl.org/ ) (specification)
16
- - [ GLEW] ( https://glew.sourceforge.net/ ) (included)
17
- - [ GLFW] ( https://www.glfw.org/ ) (included)
18
- - [ GLM] ( https://github.com/g-truc/glm ) (included)
19
- - [ ImGui] ( https://github.com/ocornut/imgui ) (included)
20
- - [ Eigen] ( https://eigen.tuxfamily.org/index.php?title=Main_Page ) (included)
19
+ - [ GLEW] ( https://glew.sourceforge.net/ )
20
+ - [ GLFW] ( https://www.glfw.org/ )
21
+ - [ GLM] ( https://github.com/g-truc/glm )
22
+ - [ Eigen] ( https://eigen.tuxfamily.org/index.php?title=Main_Page )
23
+ - [ ImGui] ( https://github.com/ocornut/imgui )
24
+ - [ Imnodes] ( https://github.com/Nelarius/imnodes/tree/d88f99125bb72cdb71b4c27ff6eb7f318d89a4c5 )
25
+ - [ Implot] ( https://github.com/epezent/implot/tree/d87512353495e7760e7fda7566a05beef7627d8f )
21
26
22
27
## Structure
23
28
24
29
An organized structure has been chosen for this template.
25
30
31
+ - [ assets] ( assets ) contains the assets of the project such as fonts and pictures
26
32
- [ cmake] ( cmake ) contains a configure file to get the minor and major versions of the current project.
27
33
- [ external] ( external ) code goes into external folder at the root of the project.
28
34
- [ include] ( include ) gather every self written header file.
@@ -35,11 +41,15 @@ An organized structure has been chosen for this template.
35
41
This repository contains submodules meaning that a recursive cloning can be done.
36
42
To clone this repository, make sure you have git installed and clone the project into the chosen folder using
37
43
38
- ``` git bash
44
+ ``` bash
39
45
git clone --recursive https://github.com/Hardcode3/Imgui_with_eigen_cmake_template.git
40
46
```
41
47
42
- If no recursive statement, cmake updated the module and clones it.
48
+ You can also clone the project using
49
+ ``` bash
50
+ git clone https://github.com/Hardcode3/Imgui_with_eigen_cmake_template.git
51
+ ```
52
+ In this case, dependencies will be cloned by cmake during the configuration stage.
43
53
44
54
## Configuring and generating
45
55
@@ -51,7 +61,7 @@ The build steps has been tested and runs fine on:
51
61
52
62
### Configuration steps on Linux
53
63
54
- Configuration on Linux requires additional libraries:
64
+ Configuration on Linux requires additional libraries. Generaly, Linux tells you which library is lacking.
55
65
If required, run the following commands to install needed libraries (detailed in the cmake configuration and building process):
56
66
57
67
``` bash
@@ -102,19 +112,39 @@ cmake --build .
102
112
Or use CMakeGui for this.
103
113
For more details, check [ cmake.org] ( https://cmake.org/ )
104
114
105
- Generating the RUNTESTS executable (CTests) should output something like this if everything is well configured:
115
+ Or launch one of the scripts in the [ scritpts folder] ( scripts ) :
116
+
117
+ ``` bash
118
+ cd scripts
119
+ sh configure_n_build_debug.sh
120
+ ```
121
+
122
+ ## CTest integration
123
+ Generating the RUNTESTS target (CTests) should output something like this if everything is well configured:
106
124
107
125
``` text
108
126
1> Start 1: imgui_test
109
- 1>1/4 Test #1: imgui_test ....................... Passed 0.67 sec
127
+ 1>1/9 Test #1: imgui_test ....................... Passed 1.19 sec
110
128
1> Start 2: eigen_test
111
- 1>2/4 Test #2: eigen_test ....................... Passed 0.02 sec
129
+ 1>2/9 Test #2: eigen_test ....................... Passed 0.01 sec
112
130
1> Start 3: glew_glfw_test
113
- 1>3/4 Test #3: glew_glfw_test ................... Passed 0.65 sec
131
+ 1>3/9 Test #3: glew_glfw_test ................... Passed 0.32 sec
114
132
1> Start 4: glm_test
115
- 1>4/4 Test #4: glm_test ......................... Passed 0.04 sec
133
+ 1>4/9 Test #4: glm_test ......................... Passed 0.01 sec
134
+ 1> Start 5: glfw_test
135
+ 1>5/9 Test #5: glfw_test ........................ Passed 0.84 sec
136
+ 1> Start 6: timer_test
137
+ 1>6/9 Test #6: timer_test ....................... Passed 0.16 sec
138
+ 1> Start 7: app_test
139
+ 1>7/9 Test #7: app_test ......................... Passed 1.18 sec
140
+ 1> Start 8: csv_test
141
+ 1>8/9 Test #8: csv_test ......................... Passed 0.01 sec
142
+ 1> Start 9: utils_str_test
143
+ 1>9/9 Test #9: utils_str_test ................... Passed 0.01 sec
116
144
1>
117
- 1>100% tests passed, 0 tests failed out of 4
145
+ 1>100% tests passed, 0 tests failed out of 9
118
146
1>
119
- 1>Total Test time (real) = 1.38 sec
147
+ 1>Total Test time (real) = 3.73 sec
120
148
```
149
+
150
+ This is a basis for further unit tests implementation.
0 commit comments