diff options
| author | ruki <[email protected]> | 2022-05-22 21:54:42 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-05-22 21:54:42 +0800 |
| commit | 6b20a9e7a540337b03ec67c3a5ea5e13c03885bd (patch) | |
| tree | 70cf014574a3d3cde851be428490dca43e091f33 | |
| parent | 95f4151df4642aba94f927c82d480d65162a4687 (diff) | |
improve moc
| -rw-r--r-- | xmake/rules/qt/moc/xmake.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xmake/rules/qt/moc/xmake.lua b/xmake/rules/qt/moc/xmake.lua index 8b619677a..2e5e3db31 100644 --- a/xmake/rules/qt/moc/xmake.lua +++ b/xmake/rules/qt/moc/xmake.lua @@ -47,7 +47,8 @@ rule("qt.moc") if sourcefile:endswith(".cpp") then filename_moc = basename .. ".moc" end - local sourcefile_moc = path.join(target:autogendir(), "rules", "qt", "moc", filename_moc) + -- we need to retain the file directory structure, @see https://github.com/xmake-io/xmake/issues/2343 + local sourcefile_moc = target:autogenfile(path.join(path.directory(sourcefile), filename_moc)) -- add objectfile local objectfile = target:objectfile(sourcefile_moc) |
