Fix for product file reference names

This commit is contained in:
starkos 2009-11-19 19:44:11 +00:00
parent 49755b0d23
commit b5dd640f9d
2 changed files with 15 additions and 3 deletions

View File

@ -72,8 +72,7 @@
kinds[cfg.kind] = true
-- try to construct a configuration-independent product name, best I can
local name = cfg.buildtarget.prefix .. cfg.buildtarget.basename .. path.getextension(cfg.buildtarget.bundlepath)
node = tree.insert(tr.products, tree.new(name))
node = tree.insert(tr.products, tree.new(path.getname(cfg.buildtarget.bundlepath)))
node.kind = "product"
node.cfg = cfg
node.path = cfg.buildtarget.fullpath

View File

@ -179,6 +179,19 @@
end
function suite.PBXFileReference_UsesTargetSuffix()
targetsuffix "-d"
kind "SharedLib"
prepare()
xcode.PBXFileReference(tr)
test.capture [[
/* Begin PBXFileReference section */
[libMyProject-d.dylib:product] /* libMyProject-d.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; name = "libMyProject-d.dylib"; path = "libMyProject-d.dylib"; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
]]
end
---------------------------------------------------------------------------
-- PBXFrameworksBuildPhase tests
---------------------------------------------------------------------------
@ -678,7 +691,7 @@
prepare()
xcode.XCBuildConfiguration_Target(tr, tr.products.children[1], premake.getconfig(tr.project, "Debug"))
test.capture [[
[MyProject:Debug] /* Debug */ = {
[MyProject-d:Debug] /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;