Skip to content

feat: make the project "Packaging compliant"#268

Merged
Miou-zora merged 40 commits intomainfrom
webgpu_plugin
Sep 8, 2025
Merged

feat: make the project "Packaging compliant"#268
Miou-zora merged 40 commits intomainfrom
webgpu_plugin

Conversation

@Miou-zora
Copy link
Contributor

@Miou-zora Miou-zora commented Sep 4, 2025

Related to no issue.

This PR makes the code more cleaner and make it compliant for packaging.

"Quick" note on what changed:

  • Include need to be prefixed by the path after src. E.g.: the file src/core/Core.hpp needs to be included as #include "core/Core.hpp" or src/resource/window/Window.hpp as #include "resource/window/Window.hpp"
  • No multiple add_includedirs because we want to use include like in package, so one at the root of the plugin/util. That's the reason why we now needs to include the path after src folder.
  • Now, a lot of add_headerfiles are added to sync local build and package build. So to include a file in a new folder of plugin/util you need to add something like add_headerfiles("src/(the/path/of/the/file/*.hpp)") (don't forget .inl too)
  • I removed some stuff of plugin/utils/core targets because it was already defined in root xmake like set_policy, add_rules, add_requires (important)
  • I added some stuff a the root xmake like set_languages("c++20"), set_warnings("allextra") (this will uniform warnings along all target), add_rules("plugin.compile_commands.autoupdate", {outputdir = ".vscode"}) (each times you will try to compile, it will generate a compile_commands.json, useful for linter)
  • I added some nano features: InputManager::IsKeyPressed, Window::SetResizable
  • I removed some useless attributes: m_lastDesired or _decoder

Important

Don't use **.ext in add_headerfiles, it can cause some errors in package. E.g.: using add_headerfiles("src/(foo/**.hpp)") for src/foo/bar/file.hpp will create foo/file.hpp include file in package which is something different than expected (foo/bar/file.hpp )

Note

Even If the branch seems to be related to webgpu, there is no webgpu related modifications, I just started with it to make it easier for me to debug/test it.

@Miou-zora Miou-zora self-assigned this Sep 4, 2025
@Miou-zora Miou-zora added enhancement New feature or request refactor Code Refactor labels Sep 4, 2025
@sonarqubecloud
Copy link

sonarqubecloud bot commented Sep 6, 2025

@Miou-zora Miou-zora marked this pull request as ready for review September 7, 2025 08:40
@Miou-zora Miou-zora requested a review from a team September 7, 2025 08:40
@Miou-zora Miou-zora changed the title Make the project "Packaging compliant" feat: make the project "Packaging compliant" Sep 7, 2025
@Miou-zora Miou-zora added the critical Very important PR that requires @CoreTeam approval label Sep 7, 2025
@Miou-zora Miou-zora merged commit e6b7ea2 into main Sep 8, 2025
13 of 16 checks passed
@Miou-zora Miou-zora deleted the webgpu_plugin branch September 8, 2025 14:35
@Miou-zora Miou-zora mentioned this pull request Oct 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

critical Very important PR that requires @CoreTeam approval enhancement New feature or request refactor Code Refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants