diff options
| author | ruki <[email protected]> | 2026-04-01 23:32:54 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2026-04-01 23:32:54 +0800 |
| commit | a58f4d0c2e60cbe87ba3569a62fceeb1587c88c4 (patch) | |
| tree | b323412305d6e8d3224d3756daba8f3ce58342c1 | |
| parent | eedaa8c079ee0eb4cf9175db5c51f11c2748dcfd (diff) | |
fix includedir for project generator
| -rw-r--r-- | xmake/rules/utils/replace/xmake.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/xmake/rules/utils/replace/xmake.lua b/xmake/rules/utils/replace/xmake.lua index da04a0720..a3608cc34 100644 --- a/xmake/rules/utils/replace/xmake.lua +++ b/xmake/rules/utils/replace/xmake.lua @@ -45,10 +45,10 @@ rule("utils.replace") -- get the replaced file path local replacefile = target:autogenfile(sourcefile) - -- add the original source directory as includedir for the replaced file, - -- so that relative #include paths still work + -- add the original source directory as includedir, + -- so that relative #include paths still work after replacing local sourcedir = path.directory(path.absolute(sourcefile)) - target:fileconfig_add(replacefile, {includedirs = sourcedir}) + target:add("includedirs", sourcedir) -- replace the sourcefile in the build sourcebatch, -- so that the compiler uses the replaced file instead of the original |
