2023-04-28 11:46:29 +02:00
|
|
|
#====================FMT ====================
|
|
|
|
set(fmt_DIR ${CMAKE_CURRENT_SOURCE_DIR}/fmt)
|
|
|
|
add_subdirectory(${fmt_DIR})
|
2023-04-27 18:13:19 +02:00
|
|
|
|
|
|
|
#=================== SDL3 ===================
|
|
|
|
|
|
|
|
set(SDL3_DIR ${CMAKE_CURRENT_SOURCE_DIR}/SDL)
|
|
|
|
add_subdirectory(${SDL3_DIR})
|
|
|
|
|
|
|
|
#=================== IMGUI ===================
|
|
|
|
|
|
|
|
set(IMGUI_DIR ${CMAKE_CURRENT_SOURCE_DIR}/imgui)
|
|
|
|
add_library(IMGUI STATIC)
|
|
|
|
|
|
|
|
target_sources( IMGUI
|
|
|
|
PRIVATE
|
|
|
|
${IMGUI_DIR}/imgui_demo.cpp
|
|
|
|
${IMGUI_DIR}/imgui_draw.cpp
|
|
|
|
${IMGUI_DIR}/imgui_tables.cpp
|
|
|
|
${IMGUI_DIR}/imgui_widgets.cpp
|
|
|
|
${IMGUI_DIR}/imgui.cpp
|
|
|
|
|
|
|
|
PRIVATE
|
|
|
|
${IMGUI_DIR}/backends/imgui_impl_opengl3.cpp
|
|
|
|
${IMGUI_DIR}/backends/imgui_impl_sdl3.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
target_include_directories( IMGUI
|
|
|
|
PUBLIC ${IMGUI_DIR}
|
|
|
|
PUBLIC ${IMGUI_DIR}/backends
|
|
|
|
PUBLIC ${SDL3_DIR}/include
|
|
|
|
)
|
|
|
|
|
|
|
|
find_package(OpenGL REQUIRED)
|
|
|
|
target_link_libraries(IMGUI PUBLIC ${OPENGL_LIBRARIES})
|
|
|
|
|
|
|
|
|
|
|
|
target_link_libraries(IMGUI PUBLIC SDL3-shared ${CMAKE_DL_LIBS})
|
|
|
|
|
|
|
|
|