diff options
| -rw-r--r-- | xmake/core/base/path.lua | 4 | ||||
| -rw-r--r-- | xmake/plugins/project/cmake/cmakelists.lua | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/xmake/core/base/path.lua b/xmake/core/base/path.lua index 421797f07..bd0701702 100644 --- a/xmake/core/base/path.lua +++ b/xmake/core/base/path.lua @@ -128,8 +128,8 @@ function _instance:__concat(other) if path.instance_of(self) then return path.new(path.join(self:str(), tostring(other)), self._TRANSFORM) elseif type(self) == "string" then - return path.new(self, function (p) - return self .. tostring(other) + return path.new(tostring(other), function (p) + return self .. p end) else os.raise("cannot concat %s/%s", tostring(self), type(self)) diff --git a/xmake/plugins/project/cmake/cmakelists.lua b/xmake/plugins/project/cmake/cmakelists.lua index 4ccb67670..e94f4e2f4 100644 --- a/xmake/plugins/project/cmake/cmakelists.lua +++ b/xmake/plugins/project/cmake/cmakelists.lua @@ -661,7 +661,7 @@ function _get_command_string(cmd, outputdir) end table.insert(argv, v) end - local command = cmd.program .. " " .. os.args(argv) + local command = _get_unix_path_relative_to_cmake(cmd.program) .. " " .. os.args(argv) if opt and opt.curdir then command = "${CMAKE_COMMAND} -E chdir " .. _get_unix_path_relative_to_cmake(opt.curdir, outputdir) .. " " .. command end |
