diff options
| author | ruki <[email protected]> | 2020-04-23 23:44:18 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-04-23 16:25:51 +0800 |
| commit | 976084c2a96e63e481cf101ba2013130a6ff44b3 (patch) | |
| tree | 3df40e07f7a6c30752c8ea716b0edce4b1bb11ad /xmake/rules/xcode/framework/xmake.lua | |
| parent | 75fa723391e9fb1006414905b9885274e8e3ee51 (diff) | |
improve xcode.framework
Diffstat (limited to 'xmake/rules/xcode/framework/xmake.lua')
| -rw-r--r-- | xmake/rules/xcode/framework/xmake.lua | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/xmake/rules/xcode/framework/xmake.lua b/xmake/rules/xcode/framework/xmake.lua index fdca2a4d7..46bbf6476 100644 --- a/xmake/rules/xcode/framework/xmake.lua +++ b/xmake/rules/xcode/framework/xmake.lua @@ -43,7 +43,6 @@ rule("xcode.framework") target:set("kind", "shared") end target:set("filename", target:basename()) - target:set("targetdir", contentsdir) -- export frameworks for `add_deps()` target:data_set("inherit.links", false) -- disable to inherit links, @see rule("utils.inherit.links") @@ -108,6 +107,12 @@ rule("xcode.framework") cprint("${color.build.target}generating.xcode.$(mode) %s", path.filename(bundledir)) end + -- copy target file + if not os.isdir(contentsdir) then + os.mkdir(contentsdir) + end + os.vcp(target:targetfile(), contentsdir) + -- move header files os.tryrm(headersdir) os.mv(path.join(contentsdir, "Headers.tmp", target:basename()), headersdir) @@ -145,8 +150,10 @@ rule("xcode.framework") os.ln(path.join("Versions/Current", target_filename), target_filename) os.cd(oldir) - -- do codesign - codesign(contentsdir, target:values("xcode.codesign_identity") or get_config("xcode_codesign_identity")) + -- do codesign, only for dynamic library + if target:targetkind() == "shared" then + codesign(contentsdir, target:values("xcode.codesign_identity") or get_config("xcode_codesign_identity")) + end -- update files and values to the dependent file dependinfo.files = {bundledir} |
