vcpkg/ports/hello-imgui/usage
Pascal Thomet a938bfa9d6
Add hello_imgui port (#36501)
With suggestions from code review by @dgoyt (thanks a lot for the attentive review :-)
Co-authored-by: Kai Pastor <dg0yt@darc.de>
2024-02-07 22:28:33 -08:00

18 lines
787 B
Plaintext

hello_imgui provides CMake targets and hello_imgui_add_app:
Usage with `hello_imgui_add_app` (recommended)
set(CMAKE_CXX_STANDARD 17)
find_package(hello-imgui CONFIG REQUIRED)
hello_imgui_add_app(test test.cpp) # see example below
Usage with `target_link_libraries`
set(CMAKE_CXX_STANDARD 17)
find_package(hello-imgui CONFIG REQUIRED)
# Note the subtle difference between the package name and the target name: hello-imgui vs hello_imgui!
target_link_libraries(main PRIVATE hello-imgui::hello_imgui)
# this mode will ignore all of hello_imgui cmake tooling, and will not deploy the assets
Example test.cpp:
#include "hello_imgui/hello_imgui.h"
int main() { HelloImGui::Run([](){ ImGui::Text("Hello, world!"); ImGui::ShowDemoWindow(); }); }