Skip to content

Commit

Permalink
Refactor about imgui_platform (#945)
Browse files Browse the repository at this point in the history
Refactor about imgui_platform
  • Loading branch information
durswd authored Jul 12, 2023
1 parent b4df771 commit 462c2a6
Show file tree
Hide file tree
Showing 18 changed files with 40 additions and 3,749 deletions.
1 change: 1 addition & 0 deletions Dev/Cpp/3rdParty/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,6 @@ if (BUILD_VIEWER OR BUILD_EDITOR)
target_link_libraries(ImGradientHDR PRIVATE imgui)
set_target_properties (ImGradientHDR PROPERTIES FOLDER Thirdparty)

add_subdirectory(imgui_platform)
endif()

35 changes: 35 additions & 0 deletions Dev/Cpp/3rdParty/imgui_platform/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
cmake_minimum_required(VERSION 3.15)
project(imgui_platform)

set(srcs
imgui_impl_glfw.cpp
imgui_impl_glfw.h
imgui_impl_opengl3.cpp
imgui_impl_opengl3.h
imgui_impl_opengl3_loader.h)

if (WIN32)

list(APPEND srcs
imgui_impl_dx11.cpp
imgui_impl_dx11.h
)


endif()

add_library(${PROJECT_NAME} STATIC ${srcs})
target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(${PROJECT_NAME} PRIVATE imgui)
target_include_directories(
${PROJECT_NAME}
PRIVATE
${EFK_THIRDPARTY_INCLUDES}
)

add_dependencies(
${PROJECT_NAME}
ExternalProject_glfw)

set_target_properties (${PROJECT_NAME} PROPERTIES FOLDER Thirdparty)

10 changes: 3 additions & 7 deletions Dev/Cpp/EffekseerMaterialEditor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
project(EffekseerMaterialEditor)

# Check cmake version
cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 3.15)

# For MSVC
if (MSVC)
Expand All @@ -20,18 +20,14 @@ file(GLOB hs
Dialog/*.h
Graphics/*.h)

file(GLOB srcs_third_imgui_platform
ThirdParty/imgui_platform/imgui_impl_opengl3.cpp
ThirdParty/imgui_platform/imgui_impl_glfw.cpp)

link_directories(
${PROJECT_SOURCE_DIR}/../lib/
)

# Add compile targets
add_executable(
EffekseerMaterialEditor
${hs} ${srcs} ${srcs_third_imgui_platform})
${hs} ${srcs})

# Flags
if (MSVC)
Expand All @@ -56,7 +52,6 @@ target_include_directories(
../include/
${PROJECT_SOURCE_DIR}/../3rdParty/AltseedRHI/include/
../EffekseerMaterial/
ThirdParty/imgui_platform/
ThirdParty/picojson/
ThirdParty/stb_image/)

Expand All @@ -75,6 +70,7 @@ target_link_libraries(
Boxer
nfd
imgui
imgui_platform
imgui-node-editor
ImGradientHDR
)
Expand Down
729 changes: 0 additions & 729 deletions Dev/Cpp/Viewer/3rdParty/imgui_platform/imgui_impl_dx11.cpp

This file was deleted.

27 changes: 0 additions & 27 deletions Dev/Cpp/Viewer/3rdParty/imgui_platform/imgui_impl_dx11.h

This file was deleted.

1,164 changes: 0 additions & 1,164 deletions Dev/Cpp/Viewer/3rdParty/imgui_platform/imgui_impl_glfw.cpp

This file was deleted.

51 changes: 0 additions & 51 deletions Dev/Cpp/Viewer/3rdParty/imgui_platform/imgui_impl_glfw.h

This file was deleted.

Loading

0 comments on commit 462c2a6

Please sign in to comment.