From ac6b9dc87fd5a4bfda1b01c00cb9ad0918d7cacb Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Fri, 4 Sep 2020 17:03:33 +1000 Subject: [PATCH] dep/imgui: Move implementations to frontend-common --- dep/imgui/CMakeLists.txt | 17 ----------- dep/imgui/imgui.vcxproj | 30 +++++-------------- dep/imgui/imgui.vcxproj.filters | 6 ---- src/frontend-common/CMakeLists.txt | 17 +++++++++++ src/frontend-common/frontend-common.vcxproj | 6 ++++ .../frontend-common.vcxproj.filters | 6 ++++ .../frontend-common}/imgui_impl_dx11.cpp | 0 .../frontend-common}/imgui_impl_dx11.h | 0 .../frontend-common}/imgui_impl_opengl3.cpp | 0 .../frontend-common}/imgui_impl_opengl3.h | 0 .../frontend-common}/imgui_impl_vulkan.cpp | 0 .../frontend-common}/imgui_impl_vulkan.h | 0 12 files changed, 37 insertions(+), 45 deletions(-) rename {dep/imgui/src => src/frontend-common}/imgui_impl_dx11.cpp (100%) rename {dep/imgui/include => src/frontend-common}/imgui_impl_dx11.h (100%) rename {dep/imgui/src => src/frontend-common}/imgui_impl_opengl3.cpp (100%) rename {dep/imgui/include => src/frontend-common}/imgui_impl_opengl3.h (100%) rename {dep/imgui/src => src/frontend-common}/imgui_impl_vulkan.cpp (100%) rename {dep/imgui/include => src/frontend-common}/imgui_impl_vulkan.h (100%) diff --git a/dep/imgui/CMakeLists.txt b/dep/imgui/CMakeLists.txt index 8f5b999f2..d87184ad5 100644 --- a/dep/imgui/CMakeLists.txt +++ b/dep/imgui/CMakeLists.txt @@ -18,20 +18,3 @@ target_include_directories(imgui PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/include" " target_include_directories(imgui INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/include") target_compile_definitions(imgui PRIVATE "imgui_STATIC") -target_sources(imgui PRIVATE - include/imgui_impl_opengl3.h - src/imgui_impl_opengl3.cpp -) -target_link_libraries(imgui PRIVATE glad) - -target_sources(imgui PRIVATE - include/imgui_impl_vulkan.h - src/imgui_impl_vulkan.cpp -) -target_link_libraries(imgui PRIVATE vulkan-loader) - -if(WIN32) - target_sources(imgui PRIVATE include/imgui_impl_dx11.h src/imgui_impl_dx11.cpp) -endif() - - diff --git a/dep/imgui/imgui.vcxproj b/dep/imgui/imgui.vcxproj index 245fbbb3d..b88cad554 100644 --- a/dep/imgui/imgui.vcxproj +++ b/dep/imgui/imgui.vcxproj @@ -37,9 +37,6 @@ - - - @@ -49,20 +46,9 @@ - - - - - - {43540154-9e1e-409c-834f-b84be5621388} - - - {9c8ddeb0-2b8f-4f5f-ba86-127cdf27f035} - - {BB08260F-6FBC-46AF-8924-090EE71360C6} Win32Proj @@ -211,7 +197,7 @@ Disabled imgui_STATIC;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) ProgramDatabase - $(SolutionDir)dep\glad\include;$(SolutionDir)dep\vulkan-loader\include;$(ProjectDir)include;$(ProjectDir)src;%(AdditionalIncludeDirectories) + $(ProjectDir)include;$(ProjectDir)src;%(AdditionalIncludeDirectories) true stdcpp17 true @@ -231,7 +217,7 @@ Disabled imgui_STATIC;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) ProgramDatabase - $(SolutionDir)dep\glad\include;$(SolutionDir)dep\vulkan-loader\include;$(ProjectDir)include;$(ProjectDir)src;%(AdditionalIncludeDirectories) + $(ProjectDir)include;$(ProjectDir)src;%(AdditionalIncludeDirectories) true stdcpp17 true @@ -251,7 +237,7 @@ Disabled imgui_STATIC;WIN32;_ITERATOR_DEBUG_LEVEL=1;_DEBUG;_LIB;%(PreprocessorDefinitions) ProgramDatabase - $(SolutionDir)dep\glad\include;$(SolutionDir)dep\vulkan-loader\include;$(ProjectDir)include;$(ProjectDir)src;%(AdditionalIncludeDirectories) + $(ProjectDir)include;$(ProjectDir)src;%(AdditionalIncludeDirectories) true stdcpp17 false @@ -273,7 +259,7 @@ Disabled imgui_STATIC;WIN32;_ITERATOR_DEBUG_LEVEL=1;_DEBUG;_LIB;%(PreprocessorDefinitions) ProgramDatabase - $(SolutionDir)dep\glad\include;$(SolutionDir)dep\vulkan-loader\include;$(ProjectDir)include;$(ProjectDir)src;%(AdditionalIncludeDirectories) + $(ProjectDir)include;$(ProjectDir)src;%(AdditionalIncludeDirectories) true stdcpp17 false @@ -295,7 +281,7 @@ MaxSpeed true imgui_STATIC;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - $(SolutionDir)dep\glad\include;$(SolutionDir)dep\vulkan-loader\include;$(ProjectDir)include;$(ProjectDir)src;%(AdditionalIncludeDirectories) + $(ProjectDir)include;$(ProjectDir)src;%(AdditionalIncludeDirectories) true /Zo /utf-8 %(AdditionalOptions) false @@ -318,7 +304,7 @@ MaxSpeed true imgui_STATIC;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - $(SolutionDir)dep\glad\include;$(SolutionDir)dep\vulkan-loader\include;$(ProjectDir)include;$(ProjectDir)src;%(AdditionalIncludeDirectories) + $(ProjectDir)include;$(ProjectDir)src;%(AdditionalIncludeDirectories) true /Zo /utf-8 %(AdditionalOptions) true @@ -342,7 +328,7 @@ MaxSpeed true imgui_STATIC;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - $(SolutionDir)dep\glad\include;$(SolutionDir)dep\vulkan-loader\include;$(ProjectDir)include;$(ProjectDir)src;%(AdditionalIncludeDirectories) + $(ProjectDir)include;$(ProjectDir)src;%(AdditionalIncludeDirectories) true /Zo /utf-8 %(AdditionalOptions) false @@ -365,7 +351,7 @@ MaxSpeed true imgui_STATIC;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - $(SolutionDir)dep\glad\include;$(SolutionDir)dep\vulkan-loader\include;$(ProjectDir)include;$(ProjectDir)src;%(AdditionalIncludeDirectories) + $(ProjectDir)include;$(ProjectDir)src;%(AdditionalIncludeDirectories) true /Zo /utf-8 %(AdditionalOptions) true diff --git a/dep/imgui/imgui.vcxproj.filters b/dep/imgui/imgui.vcxproj.filters index 1d6e671ff..0257cb6dd 100644 --- a/dep/imgui/imgui.vcxproj.filters +++ b/dep/imgui/imgui.vcxproj.filters @@ -1,8 +1,6 @@  - - @@ -10,15 +8,11 @@ - - - - \ No newline at end of file diff --git a/src/frontend-common/CMakeLists.txt b/src/frontend-common/CMakeLists.txt index b92984c92..91585ff6a 100644 --- a/src/frontend-common/CMakeLists.txt +++ b/src/frontend-common/CMakeLists.txt @@ -16,6 +16,23 @@ if(WIN32) endif() if(NOT BUILD_LIBRETRO_CORE) + target_sources(imgui PRIVATE + imgui_impl_opengl3.h + imgui_impl_opengl3.cpp + ) + + target_sources(imgui PRIVATE + imgui_impl_vulkan.h + imgui_impl_vulkan.cpp + ) + + if(WIN32) + target_sources(imgui PRIVATE + imgui_impl_dx11.h + imgui_impl_dx11.cpp + ) + endif() + target_sources(frontend-common PRIVATE common_host_interface.cpp common_host_interface.h diff --git a/src/frontend-common/frontend-common.vcxproj b/src/frontend-common/frontend-common.vcxproj index 8cfe596ea..22d7690d0 100644 --- a/src/frontend-common/frontend-common.vcxproj +++ b/src/frontend-common/frontend-common.vcxproj @@ -73,6 +73,9 @@ + + + @@ -90,6 +93,9 @@ + + + diff --git a/src/frontend-common/frontend-common.vcxproj.filters b/src/frontend-common/frontend-common.vcxproj.filters index 5efdfa632..8b9148ca3 100644 --- a/src/frontend-common/frontend-common.vcxproj.filters +++ b/src/frontend-common/frontend-common.vcxproj.filters @@ -16,6 +16,9 @@ + + + @@ -33,6 +36,9 @@ + + + diff --git a/dep/imgui/src/imgui_impl_dx11.cpp b/src/frontend-common/imgui_impl_dx11.cpp similarity index 100% rename from dep/imgui/src/imgui_impl_dx11.cpp rename to src/frontend-common/imgui_impl_dx11.cpp diff --git a/dep/imgui/include/imgui_impl_dx11.h b/src/frontend-common/imgui_impl_dx11.h similarity index 100% rename from dep/imgui/include/imgui_impl_dx11.h rename to src/frontend-common/imgui_impl_dx11.h diff --git a/dep/imgui/src/imgui_impl_opengl3.cpp b/src/frontend-common/imgui_impl_opengl3.cpp similarity index 100% rename from dep/imgui/src/imgui_impl_opengl3.cpp rename to src/frontend-common/imgui_impl_opengl3.cpp diff --git a/dep/imgui/include/imgui_impl_opengl3.h b/src/frontend-common/imgui_impl_opengl3.h similarity index 100% rename from dep/imgui/include/imgui_impl_opengl3.h rename to src/frontend-common/imgui_impl_opengl3.h diff --git a/dep/imgui/src/imgui_impl_vulkan.cpp b/src/frontend-common/imgui_impl_vulkan.cpp similarity index 100% rename from dep/imgui/src/imgui_impl_vulkan.cpp rename to src/frontend-common/imgui_impl_vulkan.cpp diff --git a/dep/imgui/include/imgui_impl_vulkan.h b/src/frontend-common/imgui_impl_vulkan.h similarity index 100% rename from dep/imgui/include/imgui_impl_vulkan.h rename to src/frontend-common/imgui_impl_vulkan.h