Push all project naming through premake.project.getfilename(), so projects can override the default behavior
This commit is contained in:
parent
e6a30c7ee5
commit
601ca14e6f
@ -234,9 +234,7 @@
|
||||
extension = iif(_ACTION > "vs2008", ".vcxproj", ".vcproj")
|
||||
end
|
||||
|
||||
local location = project.getlocation(prj)
|
||||
local filename = path.join(location, project.getfilename(prj))
|
||||
return filename .. extension
|
||||
return premake.project.getfilename(prj, "%%" .. extension)
|
||||
end
|
||||
|
||||
|
||||
|
@ -267,8 +267,8 @@
|
||||
--
|
||||
|
||||
function premake.project.getfilename(prj, pattern)
|
||||
local fname = pattern:gsub("%%%%", prj.name)
|
||||
fname = path.join(prj.location, fname)
|
||||
local fname = pattern:gsub("%%%%", prj.externalname or prj.name)
|
||||
fname = path.join(premake5.project.getlocation(prj), fname)
|
||||
return path.getrelative(os.getcwd(), fname)
|
||||
end
|
||||
|
||||
|
@ -323,21 +323,6 @@
|
||||
end
|
||||
|
||||
|
||||
--
|
||||
-- Retrieve the project's file name.
|
||||
--
|
||||
-- @param prj
|
||||
-- The project object to query.
|
||||
-- @return
|
||||
-- The project's file name. This will usually match the project's
|
||||
-- name, or the external name for externally created projects.
|
||||
--
|
||||
|
||||
function project.getfilename(prj)
|
||||
return prj.externalname or prj.name
|
||||
end
|
||||
|
||||
|
||||
--
|
||||
-- Return the first configuration of a project, which is used in some
|
||||
-- actions to generate project-wide defaults.
|
||||
|
Reference in New Issue
Block a user