imgui sort of works!

This commit is contained in:
Asuro
2025-02-20 01:34:55 +01:00
parent 916677a190
commit 0886adfeaf
30 changed files with 51126 additions and 18 deletions

View File

@@ -13,17 +13,11 @@ endif()
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/$<CONFIGURATION>")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/$<CONFIGURATION>")
# Vulkan i guess
find_package(Vulkan REQUIRED)
# Imgui
file(GLOB imgui_sources dependency/imgui/*.h dependency/imgui/*.cpp)
file(GLOB imgui_backend_sdl
dependency/imgui/backends/imgui_impl_sdl3.h
dependency/imgui/backends/imgui_impl_sdl3.cpp)
file(GLOB imgui_backend_vulkan
dependency/imgui/backends/imgui_impl_vulkan.h
dependency/imgui/backends/imgui_impl_vulkan.cpp)
# Engine
file(GLOB_RECURSE sources_engine engine/*.cpp engine/*.h)
@@ -38,9 +32,9 @@ target_include_directories(PuzGameEngine PUBLIC dependency/imgui)
# Game
file(GLOB_RECURSE sources_game game/*.cpp game/*.h)
file(GLOB source_singleheader dependency/tinygltf/stb_image.h dependency/tinygltf/stb_image_write.h dependency/tinygltf/json.hpp dependency/tinygltf/tiny_gltf.h)
add_library(PuzGame SHARED ${sources_game} ${source_singleheader} ${imgui_sources} ${imgui_backend_vulkan})
add_library(PuzGame SHARED ${sources_game} ${source_singleheader} ${imgui_sources})
set_property(TARGET PuzGame PROPERTY CXX_STANDARD 17)
target_include_directories(PuzGame PUBLIC dependency/imgui dependency/Vulkan-Headers/include)
target_include_directories(PuzGame PUBLIC dependency/imgui)
# SDL
add_subdirectory("${CMAKE_SOURCE_DIR}/dependency/SDL" EXCLUDE_FROM_ALL)
@@ -51,6 +45,6 @@ SET(BGFX_BUILD_EXAMPLES OFF)
add_subdirectory("${CMAKE_SOURCE_DIR}/dependency/bgfx.cmake")
# Link
target_link_libraries(PuzGame bx bimg bgfx Vulkan::Vulkan)
target_link_libraries(PuzGame bx bimg bgfx)
target_link_libraries(PuzGameEngine bx SDL3::SDL3)
set_target_properties(PuzGame PROPERTIES OUTPUT_NAME "PuzGame2")