diff options
| author | ruki <[email protected]> | 2020-04-08 23:23:31 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-04-08 14:21:08 +0800 |
| commit | 5ea1ffd7512c5dc2633acee56751ade0eed41365 (patch) | |
| tree | 1e227c8925d3cb6d62f4432fef3518664127b806 /xmake/rules/xcode/application/load.lua | |
| parent | 088df3a0bbe2bd99b5d60a5a1f5fb54d4be1673d (diff) | |
build storyboard for xcode.app
Diffstat (limited to 'xmake/rules/xcode/application/load.lua')
| -rw-r--r-- | xmake/rules/xcode/application/load.lua | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/xmake/rules/xcode/application/load.lua b/xmake/rules/xcode/application/load.lua index 20a4cc39f..cb9da887a 100644 --- a/xmake/rules/xcode/application/load.lua +++ b/xmake/rules/xcode/application/load.lua @@ -24,13 +24,22 @@ function main (target) -- get app directory local targetdir = target:targetdir() local appdir = path.join(targetdir, target:basename() .. ".app") - target:data_set("xcode.appdir", appdir) + target:data_set("xcode.app.rootdir", appdir) - -- set target info for app + -- get contents and resources directory + local contentsdir = appdir + if is_plat("macosx") then + contentsdir = path.join(appdir, "Contents") + end + local resourcesdir = path.join(contentsdir, "Resources") + target:data_set("xcode.app.contentsdir", contentsdir) + target:data_set("xcode.app.resourcesdir", resourcesdir) + + -- set target directory for app target:set("kind", "binary") target:set("filename", target:basename()) if is_plat("macosx") then - target:set("targetdir", path.join(appdir, "Contents", "MacOS")) + target:set("targetdir", path.join(contentsdir, "MacOS")) else target:set("targetdir", appdir) end |
