-
-
Notifications
You must be signed in to change notification settings - Fork 645
Description
What seems to be the problem?
If the workspace and projects are in different directories, then the Ninja generator incorrectly generates commands for postbuild, prebuild and prelink.
What did you expect to happen?
Ninja handles commands from subninja differently than make does. They are treated as if they are in the same directory as the main ninja.build.
What version of Premake are you using?
9af00b1
The solution to the problem:
in modules/ninja/ninja_cpp.lua in functions m.buildPreBuildEvents, m.buildPreLinkEvents and m.buildPostBuildEvents replace project location to workspace location for translateCommandsAndPaths:
local commands = os.translateCommandsAndPaths(cfg.prelinkcommands, cfg.project.basedir, cfg.project.location) => local commands = os.translateCommandsAndPaths(cfg.prelinkcommands, cfg.project.basedir, cfg.workspace.location)