Skip to content

Commit

Permalink
doc _example_integration
Browse files Browse the repository at this point in the history
  • Loading branch information
pthom committed Oct 16, 2023
1 parent beacc37 commit 2bae5e5
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions _example_integration/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,9 @@ No manual download or git clone is required.

## Explanations

The [CMakeLists.txt](CMakeLists.txt) file will
* download and build hello_imgui at configure time
* make the "hello_imgui_add_app" cmake function available
* Build HelloImGui and link it with your app at build time

```cmake
# Prepare hello_imgui during configure time
include(FetchContent)
FetchContent_Declare(hello_imgui GIT_REPOSITORY https://github.com/pthom/hello_imgui.git GIT_TAG master)
FetchContent_MakeAvailable(hello_imgui)
```
The [CMakeLists.txt](CMakeLists.txt) file will download and build hello_imgui at configure time, and make the "hello_imgui_add_app" cmake function available.

After this, you only need to create your exe with one line!
```cmake
hello_imgui_add_app(hello_world hello_world.main.cpp)
```
*Note: hello_imgui_add_app will automaticaly link your app to hello_imgui, and will embed the assets folder (for desktop, mobile, and emscripten apps)*

### Standard usage

Expand Down

0 comments on commit 2bae5e5

Please sign in to comment.