diff --git a/modules/CMakeLists.txt b/modules/CMakeLists.txt index a0e6a75..f7922d0 100644 --- a/modules/CMakeLists.txt +++ b/modules/CMakeLists.txt @@ -133,6 +133,8 @@ if(WIN32) logger lt_debug time + TESTS + system.test.cpp ) elseif(UNIX) @@ -151,9 +153,9 @@ elseif(UNIX) math memory input_codes + wayland-client PRIVATE_DEPENDENCIES X11 - wayland-client logger lt_debug time @@ -161,7 +163,6 @@ elseif(UNIX) system.test.cpp ) - 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_dependencies(surface wayland_${TARGET_NAME}_header) @@ -218,7 +219,6 @@ add_module( vk/debugger.cppm DEPENDENCIES app - wayland-client ecs memory assets diff --git a/modules/surface/system.cppm b/modules/surface/system.cppm index 8425472..5dcc880 100644 --- a/modules/surface/system.cppm +++ b/modules/surface/system.cppm @@ -2,6 +2,8 @@ module; #if defined(LIGHT_PLATFORM_LINUX) #include #include +#elif defined(LIGHT_PLATFORM_WINDOWS) + #include #else #error "Unsupported platform" #endif @@ -17,6 +19,16 @@ import memory.reference; import memory.null_on_move; import logger; 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 { @@ -184,7 +196,7 @@ private: module :private; 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) { @@ -514,22 +526,6 @@ void System::tick(app::TickInfo tick) #ifdef LIGHT_PLATFORM_WINDOWS -module; - #include -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 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); } -} // namespace lt::surface #endif } // namespace lt::surface diff --git a/modules/surface/system.test.cpp b/modules/surface/system.test.cpp index 8b74725..a61d5a4 100644 --- a/modules/surface/system.test.cpp +++ b/modules/surface/system.test.cpp @@ -87,7 +87,6 @@ private: System m_system { m_registry }; }; - Suite raii = "raii"_suite = [] { Case { "happy path won't throw" } = [] { auto fixture = Fixture {}; @@ -99,7 +98,6 @@ Suite raii = "raii"_suite = [] { { system.tick({}); } - lt::log::trace("Three seconds passed, quitting..."); };