diff options
| author | ruki <[email protected]> | 2021-08-04 18:30:40 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-08-04 18:30:40 +0800 |
| commit | 87d159290c9d9f5ad00e26640cb091f6ac068d05 (patch) | |
| tree | 7d17e47dab3f2e2c27a04249af187e68a7ed0cfd | |
| parent | 6027552f5f2f97dd01bd1e7ac4c5b42a2f4c546f (diff) | |
Update xmake.lua
| -rw-r--r-- | xmake/rules/c++/utils/bin2h/xmake.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/rules/c++/utils/bin2h/xmake.lua b/xmake/rules/c++/utils/bin2h/xmake.lua index b8f4adb9b..5e18090df 100644 --- a/xmake/rules/c++/utils/bin2h/xmake.lua +++ b/xmake/rules/c++/utils/bin2h/xmake.lua @@ -20,7 +20,7 @@ rule("c++.utils.bin2h") set_extensions(".bin") - on_load(function (function (target) + on_load(function (target) local headerdir = path.join(target:autogendir(), "rules", "c++", "bin2h") if not os.isfile(headerdir) then os.mkdir(headerdir) @@ -31,7 +31,7 @@ rule("c++.utils.bin2h") -- get header file local headerdir = path.join(target:autogendir(), "rules", "c++", "bin2h") - local headerfile = path.join(headerdir, path.basename(sourcefile_bin) .. ".h") + local headerfile = path.join(headerdir, (sourcefile_bin:gsub("%.", "_")) .. ".h") -- add commands batchcmds:show_progress(opt.progress, "${color.build.object}generating.header %s", sourcefile_bin) |
