From 0fb55ac8d15fe0d3edf33fc016755b515023ab37 Mon Sep 17 00:00:00 2001 From: Martin Helmut Fieber Date: Tue, 3 Jun 2025 21:32:42 +0300 Subject: [PATCH 1/2] Make template work with CMake 4 --- src/core/Core/Window.cpp | 4 +--- vendor/CMakeLists.txt | 10 +++++----- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/core/Core/Window.cpp b/src/core/Core/Window.cpp index 6965079..f469711 100644 --- a/src/core/Core/Window.cpp +++ b/src/core/Core/Window.cpp @@ -11,8 +11,6 @@ namespace App { Window::Window(const Settings& settings) { APP_PROFILE_FUNCTION(); - const auto window_flags{ - static_cast(SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI)}; const WindowSize size{DPIHandler::get_dpi_aware_window_size(settings)}; m_window = SDL_CreateWindow(settings.title.c_str(), @@ -20,7 +18,7 @@ Window::Window(const Settings& settings) { SDL_WINDOWPOS_CENTERED, size.width, size.height, - window_flags); + SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI); Uint32 renderer_flags{SDL_RENDERER_PRESENTVSYNC | SDL_RENDERER_ACCELERATED}; m_renderer = SDL_CreateRenderer(m_window, -1, renderer_flags); diff --git a/vendor/CMakeLists.txt b/vendor/CMakeLists.txt index e2515c4..d58f428 100644 --- a/vendor/CMakeLists.txt +++ b/vendor/CMakeLists.txt @@ -5,31 +5,31 @@ include(FetchContent) FetchContent_Declare( doctest GIT_REPOSITORY "https://github.com/onqtam/doctest.git" - GIT_TAG v2.4.11 + GIT_TAG v2.4.12 ) FetchContent_Declare( fmt GIT_REPOSITORY "https://github.com/fmtlib/fmt.git" - GIT_TAG 11.0.2 + GIT_TAG 11.2.0 ) FetchContent_Declare( imgui GIT_REPOSITORY "https://github.com/ocornut/imgui.git" - GIT_TAG 368123ab06b2b573d585e52f84cd782c5c006697 # Branch: docking, date: 07.11.2024, 07:58 GMT+1 + GIT_TAG a92b53df7b2beb6cedab0bf182099f1c54acbbbd # Branch: docking, date: 02.06.2024, 08:21 GMT+3 ) FetchContent_Declare( SDL2 GIT_REPOSITORY "https://github.com/libsdl-org/SDL.git" - GIT_TAG release-2.30.9 + GIT_TAG release-2.32.8 ) FetchContent_Declare( spdlog GIT_REPOSITORY "https://github.com/gabime/spdlog.git" - GIT_TAG v1.15.0 + GIT_TAG v1.15.3 ) # Settings From 72ad0c0e8ae9012fdd751f7c9617fca9a4e8e4c1 Mon Sep 17 00:00:00 2001 From: Martin Helmut Fieber Date: Tue, 3 Jun 2025 21:33:01 +0300 Subject: [PATCH 2/2] Add potential option to use sublime project --- .gitignore | 2 + template.sublime-project | 124 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 126 insertions(+) create mode 100644 template.sublime-project diff --git a/.gitignore b/.gitignore index 3185ed1..1faa45a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ # Application build output build/ distribution/ +.cache/ # Created by CPack when executing tests. Testing/ @@ -14,3 +15,4 @@ profile.json # User defined CMake preset file. CMakeUserPresets.json +*.sublime-workspace diff --git a/template.sublime-project b/template.sublime-project new file mode 100644 index 0000000..a97a8da --- /dev/null +++ b/template.sublime-project @@ -0,0 +1,124 @@ +{ + "folders": [ + { + "path": ".", + } + ], + "settings": { + "cmake": { + "build_folder": "$folder/build", + "command_line_overrides": { + "CMAKE_POLICY_VERSION_MINIMUM": "3.5", + }, + }, + "LSP": { + "clangd": { + "initializationOptions": { + "clangd.clang-tidy": true, + }, + }, + }, + }, + "build_systems": + [ + { + "config": "Debug", + "env": + { + }, + "generator": "Unix Makefiles", + "name": "Debug", + "target": "cmake_build", + "variants": + [ + { + "build_target": "App", + "name": "App" + }, + { + "artifact": "src/app/App.app/Contents/MacOS/App", + "build_target": "App", + "name": "Run: App", + "target": "cmake_run" + }, + { + "artifact": "src/app/App.app/Contents/MacOS/App", + "build_target": "App", + "debug": true, + "name": "Run under LLDB: App", + "target": "cmake_run" + }, + { + "build_target": "Core", + "name": "Core" + }, + { + "build_target": "ResourcesTest", + "name": "ResourcesTest" + }, + { + "artifact": "src/core/Tests/ResourcesTest", + "build_target": "ResourcesTest", + "name": "Run: ResourcesTest", + "target": "cmake_run" + }, + { + "artifact": "src/core/Tests/ResourcesTest", + "build_target": "ResourcesTest", + "debug": true, + "name": "Run under LLDB: ResourcesTest", + "target": "cmake_run" + }, + { + "build_target": "SDL2", + "name": "SDL2" + }, + { + "build_target": "SDL2-static", + "name": "SDL2-static" + }, + { + "build_target": "SDL2_test", + "name": "SDL2_test" + }, + { + "build_target": "Settings", + "name": "Settings" + }, + { + "build_target": "TestRunner", + "name": "TestRunner" + }, + { + "build_target": "doctest_with_main", + "name": "doctest_with_main" + }, + { + "build_target": "fmt", + "name": "fmt" + }, + { + "build_target": "imgui", + "name": "imgui" + }, + { + "build_target": "sdl_headers_copy", + "name": "sdl_headers_copy" + }, + { + "build_target": "spdlog", + "name": "spdlog" + }, + { + "build_target": "uninstall", + "name": "uninstall" + }, + { + "name": "ctest", + "target": "ctest_run" + } + ], + "working_dir": "$folder/build" + } + ], +}