Feat: Misc Update#424
Merged
Merged
Conversation
Add Common::TemplateEngine for {{ }} variable substitution over strings and
files, with Result-based error reporting (undefined/unterminated variables and
file IO surface as Err instead of asserting). Convert the Default project
template's CMakeLists.txt to a .tpl using the new syntax.
- move Editor web `npm install` out of the configure step into the build-time
Editor.Web target so configuration has no network side effects
- extract exp_get_runtime_output_dir helper, shared by exp_add_executable and
the Editor target instead of duplicating the multi-config output-dir logic
- drop `CACHE ... FORCE` on internal derived variables; derive project version
from project(Explosion VERSION 0.0.1)
- modernise `if (${VAR})` into `if (VAR)`; use built-in WIN32 / APPLE instead
of comparing CMAKE_SYSTEM_NAME against string literals
- centralize the platform RHI backend target list (platform_rhi_targets) in the
root script and reuse it in Sample and Editor
- link executables with PRIVATE; clear OUT_DEP_TARGET on the runtime-dep walker
early return; remove the redundant macOS Frameworks copy
- tighten module dependency exposure: drop unused Taskflow (Common) and assimp
(Runtime); move debugbreak / dxc / spirv-cross to PRIVATE; declare Taskflow
PRIVATE on Runtime where ECS.cpp actually uses it
The exp_* helpers are installed with the engine and re-included by downstream projects through find_package(Explosion). Their target-export and package-config rules therefore ran a second time in downstream context, installing each game/plugin's own Config/ConfigVersion/Targets files plus a copy of the engine CMake helpers - none of which a terminal consumer needs. Detect that context via CMAKE_FIND_PACKAGE_NAME (set only while the consumed package config runs) and gate all export/package-config emission on it, so the engine still exports its package while downstream install trees keep only their runtime binaries. Library/header/runtime installs are untouched, so downstream shared libraries (plugins, multi-DLL games) still install; this also avoids the install(EXPORT) error such a library would otherwise hit on the imported Explosion:: targets in its link interface.
Switch Common::TemplateEngine to '@var@' placeholders so CMake's configure_file(@only) renders the same templates, and have Editor/CMakeLists.txt instantiate the Default template into TestProject/ at configure time. Drops the duplicated standalone TestProject sources; local and CI builds now generate it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.