diff options
| author | ruki <[email protected]> | 2020-05-26 00:18:35 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-05-25 19:51:33 +0800 |
| commit | 364d1242536594a954841ed2246ca1c447e9d0b2 (patch) | |
| tree | 9288f6f0b5a5a2200c42621af814b856642ddb03 /xmake/rules/xcode/application/build.lua | |
| parent | 6707844c34b10b2cbb7844838c886e9aa315f415 (diff) | |
copy dynamic libraries for xcode app
Diffstat (limited to 'xmake/rules/xcode/application/build.lua')
| -rw-r--r-- | xmake/rules/xcode/application/build.lua | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/xmake/rules/xcode/application/build.lua b/xmake/rules/xcode/application/build.lua index 6c5b69e9d..d46d8d985 100644 --- a/xmake/rules/xcode/application/build.lua +++ b/xmake/rules/xcode/application/build.lua @@ -48,14 +48,21 @@ function main (target, opt) end -- copy target file + local binarydir = contentsdir if is_plat("macosx") then - os.vcp(target:targetfile(), path.join(contentsdir, "MacOS", path.filename(target:targetfile()))) - else - os.vcp(target:targetfile(), path.join(contentsdir, path.filename(target:targetfile()))) + binarydir = path.join(contentsdir, "MacOS") + end + os.vcp(target:targetfile(), path.join(binarydir, path.filename(target:targetfile()))) + + -- copy dependent dynamic libraries, TODO copy frameworks + for _, dep in ipairs(target:orderdeps()) do + if dep:targetkind() == "shared" then + os.vcp(dep:targetfile(), binarydir) + end end -- copy PkgInfo to the contents directory - os.cp(path.join(os.programdir(), "scripts", "PkgInfo"), resourcesdir) + os.vcp(path.join(os.programdir(), "scripts", "PkgInfo"), resourcesdir) -- copy resource files to the resources directory local srcfiles, dstfiles = target:installfiles(resourcesdir) @@ -85,7 +92,7 @@ function main (target, opt) end -- do codesign - codesign(bundledir, target:values("xcode.codesign_identity") or get_config("xcode_codesign_identity"), mobile_provision) + codesign(bundledir, target:values("xcode.codesign_identity") or get_config("xcode_codesign_identity"), mobile_provision, {deep = true}) -- update files and values to the dependent file dependinfo.files = {bundledir} |
