summaryrefslogtreecommitdiff
path: root/xmake/rules/xcode/application
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/rules/xcode/application')
-rw-r--r--xmake/rules/xcode/application/build.lua8
-rw-r--r--xmake/rules/xcode/application/load.lua5
2 files changed, 8 insertions, 5 deletions
diff --git a/xmake/rules/xcode/application/build.lua b/xmake/rules/xcode/application/build.lua
index 3ff16dcb0..6c5b69e9d 100644
--- a/xmake/rules/xcode/application/build.lua
+++ b/xmake/rules/xcode/application/build.lua
@@ -29,6 +29,7 @@ function main (target, opt)
-- get app 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-compile it?
@@ -46,6 +47,13 @@ function main (target, opt)
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 PkgInfo to the contents directory
os.cp(path.join(os.programdir(), "scripts", "PkgInfo"), resourcesdir)
diff --git a/xmake/rules/xcode/application/load.lua b/xmake/rules/xcode/application/load.lua
index ddac69126..b98c4e257 100644
--- a/xmake/rules/xcode/application/load.lua
+++ b/xmake/rules/xcode/application/load.lua
@@ -39,11 +39,6 @@ function main (target)
-- set target directory for app
target:set("kind", "binary")
target:set("filename", target:basename())
- if is_plat("macosx") then
- target:set("targetdir", path.join(contentsdir, "MacOS"))
- else
- target:set("targetdir", bundledir)
- end
-- set install directory
if is_plat("macosx") and not target:get("installdir") then