-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
seperate window manager backend from imgui frontend
this allows for different backends to be used for imgui with ease.
- Loading branch information
1 parent
6d6f570
commit af798af
Showing
7 changed files
with
689 additions
and
538 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
cmake_minimum_required(VERSION 3.20.0) | ||
|
||
add_subdirectory(sdl2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
cmake_minimum_required(VERSION 3.20.0) | ||
|
||
add_library(backend | ||
backend_sdl2.cpp | ||
${imgui_SOURCE_DIR}/backends/imgui_impl_sdl.cpp | ||
${imgui_SOURCE_DIR}/backends/imgui_impl_sdlrenderer.cpp | ||
) | ||
|
||
target_include_directories(backend PRIVATE | ||
${imgui_SOURCE_DIR}/backends | ||
) | ||
|
||
target_include_directories(backend PUBLIC | ||
${CMAKE_CURRENT_SOURCE_DIR} | ||
) | ||
|
||
find_package(SDL2 CONFIG REQUIRED) | ||
|
||
target_link_libraries(backend PRIVATE imgui) | ||
target_link_libraries(backend PRIVATE SDL2::SDL2) | ||
target_link_libraries(backend PRIVATE GBA) | ||
|
||
target_apply_lto_in_release(backend) |
Oops, something went wrong.