diff options
| author | ruki <[email protected]> | 2020-04-23 23:46:07 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-04-23 16:36:46 +0800 |
| commit | 18cc36cae0dd5938574fe395a5d0745a39c5685c (patch) | |
| tree | 59d99f1d12fdce147ed14fa8823b5d2c1a0137e8 /xmake/rules/xcode/bundle/xmake.lua | |
| parent | 976084c2a96e63e481cf101ba2013130a6ff44b3 (diff) | |
improve xcode.xxx rules
Diffstat (limited to 'xmake/rules/xcode/bundle/xmake.lua')
| -rw-r--r-- | xmake/rules/xcode/bundle/xmake.lua | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/xmake/rules/xcode/bundle/xmake.lua b/xmake/rules/xcode/bundle/xmake.lua index 709feb51d..3fc54c783 100644 --- a/xmake/rules/xcode/bundle/xmake.lua +++ b/xmake/rules/xcode/bundle/xmake.lua @@ -44,7 +44,6 @@ rule("xcode.bundle") -- set target info for bundle target:set("filename", target:basename()) - target:set("targetdir", path.join(contentsdir, "MacOS")) -- generate binary as bundle, we cannot set `-shared` or `-dynamiclib` target:set("kind", "binary") @@ -64,6 +63,7 @@ rule("xcode.bundle") -- get bundle and resources directory local bundledir = path.absolute(target:data("xcode.bundle.rootdir")) + local contentsdir = path.absolute(target:data("xcode.bundle.contentsdir")) local resourcesdir = path.absolute(target:data("xcode.bundle.resourcesdir")) -- need re-generate it? @@ -81,6 +81,13 @@ rule("xcode.bundle") cprint("${color.build.target}generating.xcode.$(mode) %s", path.filename(bundledir)) end + -- copy target file + 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()))) + end + -- copy resource files local srcfiles, dstfiles = target:installfiles(resourcesdir) if srcfiles and dstfiles then |
