From a8ce5cbaa023de2fe0501c02aaca70943d21caac Mon Sep 17 00:00:00 2001 From: Orange Date: Sat, 29 Mar 2025 01:56:09 +0300 Subject: [PATCH] added vcpkg imgui package auto link --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 469fd65..c495eef 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,6 +24,7 @@ add_library(omath::omath ALIAS omath) if (OMATH_IMGUI_INTEGRATION) target_compile_definitions(omath PUBLIC OMATH_IMGUI_INTEGRATION) + # IMGUI is being linked as submodule if(TARGET imgui) target_link_libraries(omath PUBLIC imgui) install(TARGETS imgui @@ -31,6 +32,10 @@ if (OMATH_IMGUI_INTEGRATION) ARCHIVE DESTINATION lib LIBRARY DESTINATION lib RUNTIME DESTINATION bin) + else() + # Assume that IMGUI linked via VCPKG. + find_package(imgui CONFIG REQUIRED) + target_link_libraries(omath PUBLIC imgui::imgui) endif() endif()