From 7536dd705d121ed3a49b7e4b05af88fd241d1674 Mon Sep 17 00:00:00 2001 From: vimene Date: Sun, 15 Feb 2026 15:11:49 +0100 Subject: more improvements in builds setup - moved slang shaders to spvshaders to separate software and hardware shaders - split Makefile.am into Makefile.am, src/Makefile.am and src/spvshaders/Makefile.am - build shaders as DATA primary, instead of both PROGRAMS and SCRIPTS, which greatly simplifies building. Before that, we had to first build them as PROGRAMS, and then copy them as SCRIPTS to remove executable extensions (i.e. ".exe" for Windows) - changed final executable dir from enginedir to bindir, which makes automake see it as an exec instead of data - compute relative paths from C++, which makes it possible to change dirs arbitrarily when running make while still having a relocatable executable - updated README.md to reflect changes in dirs - use AX_COMPARE_VERSION() to simplify checking if Vulkan headers version is correct - factored out most of paths computation in engine::path_utils::Paths --- src/path_utils.hpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/path_utils.hpp') diff --git a/src/path_utils.hpp b/src/path_utils.hpp index e87aad6..76567bc 100644 --- a/src/path_utils.hpp +++ b/src/path_utils.hpp @@ -8,6 +8,26 @@ namespace engine::path_utils { std::optional exe_path() noexcept; +class Paths { + public: + Paths() noexcept; + + const std::filesystem::path& assets_objs() const & noexcept { + return m_assets_objs; + } + + const std::filesystem::path& assets_textures() const & noexcept { + return m_assets_textures; + } + + const std::filesystem::path& spvshaders() const & noexcept { + return m_spvshaders; + } + + private: + std::filesystem::path m_assets_objs, m_assets_textures, m_spvshaders; +}; + } #endif // PATH_UTILS_HPP -- cgit v1.2.3