summaryrefslogtreecommitdiff
path: root/xmake/rules/c++
diff options
context:
space:
mode:
authorruki <[email protected]>2021-08-05 00:29:18 +0800
committerruki <[email protected]>2021-08-05 00:29:18 +0800
commitb700ce5f896f1a3edfadafb4c188d1f147ea4ac7 (patch)
tree298f5a01927bc8ce08eb5d0911f9f11d3f330d0d /xmake/rules/c++
parent87d159290c9d9f5ad00e26640cb091f6ac068d05 (diff)
add bin2c module
Diffstat (limited to 'xmake/rules/c++')
-rw-r--r--xmake/rules/c++/utils/bin2h/xmake.lua47
1 files changed, 0 insertions, 47 deletions
diff --git a/xmake/rules/c++/utils/bin2h/xmake.lua b/xmake/rules/c++/utils/bin2h/xmake.lua
deleted file mode 100644
index 5e18090df..000000000
--- a/xmake/rules/c++/utils/bin2h/xmake.lua
+++ /dev/null
@@ -1,47 +0,0 @@
---!A cross-platform build utility based on Lua
---
--- Licensed under the Apache License, Version 2.0 (the "License");
--- you may not use this file except in compliance with the License.
--- You may obtain a copy of the License at
---
--- http://www.apache.org/licenses/LICENSE-2.0
---
--- Unless required by applicable law or agreed to in writing, software
--- distributed under the License is distributed on an "AS IS" BASIS,
--- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
--- See the License for the specific language governing permissions and
--- limitations under the License.
---
--- Copyright (C) 2015-present, TBOOX Open Source Group.
---
--- @author ruki
--- @file xmake.lua
---
-
-rule("c++.utils.bin2h")
- set_extensions(".bin")
- on_load(function (target)
- local headerdir = path.join(target:autogendir(), "rules", "c++", "bin2h")
- if not os.isfile(headerdir) then
- os.mkdir(headerdir)
- end
- target:add("includedirs", headerdir)
- end)
- before_buildcmd_file(function (target, batchcmds, sourcefile_bin, opt)
-
- -- get header file
- local headerdir = path.join(target:autogendir(), "rules", "c++", "bin2h")
- local headerfile = path.join(headerdir, (sourcefile_bin:gsub("%.", "_")) .. ".h")
-
- -- add commands
- batchcmds:show_progress(opt.progress, "${color.build.object}generating.header %s", sourcefile_bin)
- batchcmds:mkdir(headerdir)
-
- -- TODO
-
- -- add deps
- batchcmds:add_depfiles(sourcefile_bin)
- batchcmds:set_depmtime(os.mtime(headerfile))
- batchcmds:set_depcache(target:dependfile(headerfile))
- end)
-