fix: windows build
Some checks reported errors
continuous-integration/drone/push Build was killed

This commit is contained in:
light7734 2026-01-05 16:31:05 +03:30
parent 6d5256e0ec
commit 3f455d0ca7
Signed by: light7734
GPG key ID: 20A1BB5EBAB6C1E5
3 changed files with 16 additions and 23 deletions

View file

@ -133,6 +133,8 @@ if(WIN32)
logger logger
lt_debug lt_debug
time time
TESTS
system.test.cpp
) )
elseif(UNIX) elseif(UNIX)
@ -151,9 +153,9 @@ elseif(UNIX)
math math
memory memory
input_codes input_codes
wayland-client
PRIVATE_DEPENDENCIES PRIVATE_DEPENDENCIES
X11 X11
wayland-client
logger logger
lt_debug lt_debug
time time
@ -161,7 +163,6 @@ elseif(UNIX)
system.test.cpp system.test.cpp
) )
function(add_wayland_protocol_target TARGET_NAME SPEC NAME) function(add_wayland_protocol_target TARGET_NAME SPEC NAME)
add_custom_target(wayland_${TARGET_NAME}_header COMMAND wayland-scanner client-header /usr/share/wayland-protocols${SPEC} ${CMAKE_CURRENT_SOURCE_DIR}/surface/wayland-protocols/${NAME}.h) add_custom_target(wayland_${TARGET_NAME}_header COMMAND wayland-scanner client-header /usr/share/wayland-protocols${SPEC} ${CMAKE_CURRENT_SOURCE_DIR}/surface/wayland-protocols/${NAME}.h)
add_dependencies(surface wayland_${TARGET_NAME}_header) add_dependencies(surface wayland_${TARGET_NAME}_header)
@ -218,7 +219,6 @@ add_module(
vk/debugger.cppm vk/debugger.cppm
DEPENDENCIES DEPENDENCIES
app app
wayland-client
ecs ecs
memory memory
assets assets

View file

@ -2,6 +2,8 @@ module;
#if defined(LIGHT_PLATFORM_LINUX) #if defined(LIGHT_PLATFORM_LINUX)
#include <wayland-client.h> #include <wayland-client.h>
#include <xdg-shell.h> #include <xdg-shell.h>
#elif defined(LIGHT_PLATFORM_WINDOWS)
#include <Windows.h>
#else #else
#error "Unsupported platform" #error "Unsupported platform"
#endif #endif
@ -17,6 +19,16 @@ import memory.reference;
import memory.null_on_move; import memory.null_on_move;
import logger; import logger;
import std; import std;
import surface.constants;
import debug.assertions;
import memory.reference;
import surface.requests;
import surface.events;
import logger;
import ecs.registry;
import ecs.entity;
import time;
import std;
export namespace lt::surface { export namespace lt::surface {
@ -184,7 +196,7 @@ private:
module :private; module :private;
namespace lt::surface { namespace lt::surface {
#ifdef LIGHT_PLATFORM_LINUX #if defined(LIGHT_PLATFORM_LINUX)
void handle_shell_ping(void *data, xdg_wm_base *shell, std::uint32_t serial) void handle_shell_ping(void *data, xdg_wm_base *shell, std::uint32_t serial)
{ {
@ -514,22 +526,6 @@ void System::tick(app::TickInfo tick)
#ifdef LIGHT_PLATFORM_WINDOWS #ifdef LIGHT_PLATFORM_WINDOWS
module;
#include <Windows.h>
module surface.system;
import surface.constants;
import debug.assertions;
import memory.reference;
import surface.requests;
import surface.events;
import logger;
import ecs.registry;
import ecs.entity;
import time;
import std;
namespace lt::surface {
template<class... Ts> template<class... Ts>
struct overloads: Ts... struct overloads: Ts...
{ {
@ -1038,7 +1034,6 @@ auto CALLBACK native_window_proc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa
return DefWindowProcA(hwnd, uMsg, wParam, lParam); return DefWindowProcA(hwnd, uMsg, wParam, lParam);
} }
} // namespace lt::surface
#endif #endif
} // namespace lt::surface } // namespace lt::surface

View file

@ -87,7 +87,6 @@ private:
System m_system { m_registry }; System m_system { m_registry };
}; };
Suite raii = "raii"_suite = [] { Suite raii = "raii"_suite = [] {
Case { "happy path won't throw" } = [] { Case { "happy path won't throw" } = [] {
auto fixture = Fixture {}; auto fixture = Fixture {};
@ -99,7 +98,6 @@ Suite raii = "raii"_suite = [] {
{ {
system.tick({}); system.tick({});
} }
lt::log::trace("Three seconds passed, quitting..."); lt::log::trace("Three seconds passed, quitting...");
}; };