Fix OSXFramework bundlepath

This commit is contained in:
tempura-sukiyaki 2018-08-01 12:28:32 +09:00
parent 3f1f44eca8
commit ea4f03c4cd
2 changed files with 28 additions and 2 deletions

View File

@ -50,7 +50,7 @@
if cfg.system == p.MACOSX and (kind == p.WINDOWEDAPP or (kind == p.SHAREDLIB and cfg.sharedlibtype)) then
bundlename = basename .. extension
bundlepath = path.join(bundlename, "Contents/MacOS")
bundlepath = path.join(bundlename, iif(kind == p.SHAREDLIB and cfg.sharedlibtype == "OSXFramework", "Versions/A", "Contents/MacOS"))
end
local info = {}

View File

@ -219,6 +219,32 @@
end
--
-- Bundle path should be set for macOS/iOS cocoa bundle.
--
function suite.bundlepathSet_onMacSharedLibOSXBundle()
kind "SharedLib"
sharedlibtype "OSXBundle"
system "macosx"
i = prepare()
test.isequal("bin/Debug/MyProject.bundle/Contents/MacOS", path.getrelative(os.getcwd(), i.bundlepath))
end
--
-- Bundle path should be set for macOS/iOS framework.
--
function suite.bundlepathSet_onMacSharedLibOSXFramework()
kind "SharedLib"
sharedlibtype "OSXFramework"
system "macosx"
i = prepare()
test.isequal("bin/Debug/MyProject.framework/Versions/A", path.getrelative(os.getcwd(), i.bundlepath))
end
--
-- Target extension is used if set.
--