mirror of https://github.com/microsoft/vcpkg.git
108 lines
3.2 KiB
Diff
108 lines
3.2 KiB
Diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index a1c83a3..bba4c19 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -22,11 +22,14 @@ if (VULKAN_SDK)
|
|
set(ENV{VULKAN_SDK} ${VULKAN_SDK})
|
|
endif()
|
|
|
|
-find_package(vsg 1.1.10)
|
|
+find_package(vsg CONFIG REQUIRED)
|
|
+find_package(imgui CONFIG REQUIRED)
|
|
+find_package(implot CONFIG REQUIRED)
|
|
|
|
vsg_setup_dir_vars()
|
|
vsg_setup_build_vars()
|
|
|
|
+if(0)
|
|
if ( (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/src/imgui/imgui.h) OR
|
|
(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/src/implot/implot.h) )
|
|
find_package(Git QUIET)
|
|
@@ -50,6 +53,7 @@ vsg_copy_imgui_headers(
|
|
${VSGIMGUI_SOURCE_DIR}/src/implot/implot.h
|
|
${VSGIMGUI_SOURCE_DIR}/src/implot/implot_internal.h
|
|
)
|
|
+endif(0)
|
|
|
|
vsg_add_target_clang_format(
|
|
FILES
|
|
diff --git a/include/vsgImGui/RenderImGui.h b/include/vsgImGui/RenderImGui.h
|
|
index 9eddd36..656d0b1 100644
|
|
--- a/include/vsgImGui/RenderImGui.h
|
|
+++ b/include/vsgImGui/RenderImGui.h
|
|
@@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
#include <vsg/vk/DescriptorPool.h>
|
|
|
|
#include <vsgImGui/Export.h>
|
|
-#include <vsgImGui/imgui.h>
|
|
+#include <imgui.h>
|
|
|
|
namespace vsgImGui
|
|
{
|
|
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
|
index 41d749d..b895225 100644
|
|
--- a/src/CMakeLists.txt
|
|
+++ b/src/CMakeLists.txt
|
|
@@ -34,6 +34,9 @@ set(SOURCES
|
|
implot/implot_items.cpp
|
|
)
|
|
|
|
+list(FILTER HEADERS EXCLUDE REGEX "^imgui/|^implot/|/imgui.h\$")
|
|
+list(FILTER SOURCES EXCLUDE REGEX "^imgui/|^implot/")
|
|
+
|
|
OPTION(SHOW_DEMO_WINDOW "Toggle the build of the ImGui::ShowDemoWindow(bool*) and ImPlot::ShadowDemoWindow(bool*)" ON)
|
|
|
|
if (SHOW_DEMO_WINDOW)
|
|
@@ -73,6 +76,8 @@ target_include_directories(vsgImGui PUBLIC
|
|
target_link_libraries(vsgImGui
|
|
PUBLIC
|
|
vsg::vsg
|
|
+ imgui::imgui
|
|
+ implot::implot
|
|
PRIVATE
|
|
${EXTRA_LIBRARIES}
|
|
)
|
|
diff --git a/src/vsgImGui/RenderImGui.cpp b/src/vsgImGui/RenderImGui.cpp
|
|
index 31780eb..fd70a6f 100644
|
|
--- a/src/vsgImGui/RenderImGui.cpp
|
|
+++ b/src/vsgImGui/RenderImGui.cpp
|
|
@@ -22,9 +22,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
</editor-fold> */
|
|
|
|
#include <vsgImGui/RenderImGui.h>
|
|
-#include <vsgImGui/implot.h>
|
|
+#include <implot.h>
|
|
|
|
-#include "../imgui/backends/imgui_impl_vulkan.h"
|
|
+#include <imgui_impl_vulkan.h>
|
|
|
|
#include <vsg/io/Logger.h>
|
|
#include <vsg/maths/color.h>
|
|
diff --git a/src/vsgImGui/SendEventsToImGui.cpp b/src/vsgImGui/SendEventsToImGui.cpp
|
|
index 11de226..ef784fc 100644
|
|
--- a/src/vsgImGui/SendEventsToImGui.cpp
|
|
+++ b/src/vsgImGui/SendEventsToImGui.cpp
|
|
@@ -22,7 +22,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
</editor-fold> */
|
|
|
|
#include <vsgImGui/SendEventsToImGui.h>
|
|
-#include <vsgImGui/imgui.h>
|
|
+#include <imgui.h>
|
|
|
|
#include <vsg/ui/KeyEvent.h>
|
|
#include <vsg/ui/PointerEvent.h>
|
|
diff --git a/src/vsgImGuiConfig.cmake.in b/src/vsgImGuiConfig.cmake.in
|
|
index e2c14f2..e0dcc98 100644
|
|
--- a/src/vsgImGuiConfig.cmake.in
|
|
+++ b/src/vsgImGuiConfig.cmake.in
|
|
@@ -1,6 +1,8 @@
|
|
include(CMakeFindDependencyMacro)
|
|
|
|
find_dependency(Vulkan)
|
|
-find_dependency(vsg)
|
|
+find_dependency(vsg CONFIG)
|
|
+find_dependency(imgui CONFIG)
|
|
+find_dependency(implot CONFIG)
|
|
|
|
include("${CMAKE_CURRENT_LIST_DIR}/vsgImGuiTargets.cmake")
|