Add Dear ImGui

This commit is contained in:
Guillaume Meunier
2024-01-28 11:33:31 +01:00
parent 891ff81c4f
commit d5e1165ff4
3 changed files with 18 additions and 2 deletions
+5
View File
@@ -129,6 +129,11 @@ FetchContent_Declare(monado
GIT_TAG 79bf8eb8fa168f65f4e5505e0525ee74aa88783e
)
# Use the docking branch of imgui to use multi-viewport
FetchContent_Declare(imgui
GIT_REPOSITORY https://github.com/ocornut/imgui.git
GIT_TAG ce0d0ac8298ce164b5d862577e8b087d92f6e90e
)
add_subdirectory(external)
add_subdirectory(common)
+1
View File
@@ -235,6 +235,7 @@ Launch No Man's Sky in VR mode on Steam when connection with headset is establis
WiVRn uses the following software:
- [Avahi](https://www.avahi.org/)
- [Boost.PFR](https://github.com/boostorg/pfr)
- [Dear ImGui](https://github.com/ocornut/imgui)
- [ffmpeg](https://ffmpeg.org/) optional, for hardware encoding on AMD/Intel
- [FreeType](https://freetype.org/)
- [glm](http://glm.g-truc.net/)
+12 -2
View File
@@ -5,12 +5,22 @@ set(TINYGLTF_BUILD_BUILDER_EXAMPLE OFF)
set(TINYGLTF_HEADER_ONLY OFF)
set(TINYGLTF_INSTALL OFF)
FetchContent_MakeAvailable(spdlog glm tinygltf)
FetchContent_MakeAvailable(spdlog glm tinygltf imgui)
include(FreetypeHarfbuzz)
include(CompileGLSL)
include(VulkanVersion)
add_library(imgui OBJECT
${imgui_SOURCE_DIR}/imgui.cpp
${imgui_SOURCE_DIR}/imgui_draw.cpp
${imgui_SOURCE_DIR}/imgui_tables.cpp
${imgui_SOURCE_DIR}/imgui_widgets.cpp
${imgui_SOURCE_DIR}/backends/imgui_impl_vulkan.cpp
)
target_include_directories(imgui PUBLIC ${imgui_SOURCE_DIR})
if(ANDROID)
add_library(wivrn MODULE)
@@ -107,7 +117,7 @@ file(GLOB_RECURSE VULKAN_SHADERS CONFIGURE_DEPENDS "*.glsl")
target_sources(wivrn PRIVATE ${LOCAL_SOURCE} ${VULKAN_SHADERS})
wivrn_compile_glsl(wivrn ${VULKAN_SHADERS})
target_link_libraries(wivrn Vulkan::Vulkan spdlog::spdlog glm::glm tinygltf FreetypeHarfbuzz)
target_link_libraries(wivrn Vulkan::Vulkan spdlog::spdlog glm::glm tinygltf FreetypeHarfbuzz imgui)
target_compile_definitions(wivrn PRIVATE -DXR_USE_GRAPHICS_API_VULKAN)
target_compile_definitions(wivrn PRIVATE -DVMA_STATS_STRING_ENABLED=0)
target_compile_options(wivrn PRIVATE -fdiagnostics-color -Wall -Wextra -pedantic) # -Werror