diff --git a/src/base/config.lua b/src/base/config.lua index 6fb8fa96..eab7f9c6 100755 --- a/src/base/config.lua +++ b/src/base/config.lua @@ -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 = {} diff --git a/tests/config/test_targetinfo.lua b/tests/config/test_targetinfo.lua index 58e2d4d4..0410b0b4 100755 --- a/tests/config/test_targetinfo.lua +++ b/tests/config/test_targetinfo.lua @@ -183,7 +183,7 @@ test.isequal("libMyProject.a", i.name) end - + -- -- Name should use a prefix if set. -- @@ -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. --