Open lochnessdragon opened 2 months ago
Better to split PRs.
getrelative
should be fixed by the other PR (waiting change from premake core).
So current hack to handle it will be rejected.Since platforms like macos and linux don't integrate support for rc/res files, the "rc" rule shouldn't be generated. This removes the expectation that every toolset has a rc file command and allows support for custom toolsets, like emscripten, that don't support rc files.
Do you remember which error you hit with Emscripten?
I have been using Ninja with https://github.com/tritao/premake-emscripten and so far have had no issues related to rc
.
Changes
Ninja expects all paths to be relative to the root ninja folder
(see: Issue 997 in ninja-build/ninja) Ninja expects paths to files to be relative to the root build file. Unfortunately, premake has no way of telling this to the toolsets, but we can work around this limitation by tricking them into generating paths relative to the workspace directory. See lines 255-262 and 273-280 for specifics.
RC files shouldn't be supported on targets other than windows
Since platforms like macos and linux don't integrate support for rc/res files, the "rc" rule shouldn't be generated. This removes the expectation that every toolset has a rc file command and allows support for custom toolsets, like emscripten, that don't support rc files.
Custom toolset support
Added simple support for custom toolset. Ninja will check for the function
clang_like()
on toolsets and if it returns true, will generate compilation rules using the gcc/clang branch of the conditional incompilation_rules(...)
.Associated Issues
Fixes #32