Fix managed C++ linking of unmanaged library dependencies
This commit is contained in:
parent
157d96e39d
commit
428b9cad2f
@ -822,9 +822,20 @@
|
|||||||
--
|
--
|
||||||
|
|
||||||
m.elements.projectReferences = function(prj, ref)
|
m.elements.projectReferences = function(prj, ref)
|
||||||
return {
|
if prj.flags.Managed then
|
||||||
m.projectReferenceProject,
|
return {
|
||||||
}
|
m.referenceProject,
|
||||||
|
m.referencePrivate,
|
||||||
|
m.referenceOutputAssembly,
|
||||||
|
m.referenceCopyLocalSatelliteAssemblies,
|
||||||
|
m.referenceLinkLibraryDependencies,
|
||||||
|
m.referenceUseLibraryDependences,
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return {
|
||||||
|
m.referenceProject,
|
||||||
|
}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function m.projectReferences(prj)
|
function m.projectReferences(prj)
|
||||||
@ -1391,11 +1402,6 @@
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function m.projectReferenceProject(prj, ref)
|
|
||||||
p.w('<Project>{%s}</Project>', ref.uuid)
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
function m.propertyGroup(cfg, label)
|
function m.propertyGroup(cfg, label)
|
||||||
local cond
|
local cond
|
||||||
if cfg then
|
if cfg then
|
||||||
@ -1418,7 +1424,6 @@
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function m.propertySheetGroup(prj)
|
function m.propertySheetGroup(prj)
|
||||||
for cfg in project.eachconfig(prj) do
|
for cfg in project.eachconfig(prj) do
|
||||||
m.propertySheets(cfg)
|
m.propertySheets(cfg)
|
||||||
@ -1426,6 +1431,35 @@
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function m.referenceCopyLocalSatelliteAssemblies(prj, ref)
|
||||||
|
p.w('<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>')
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function m.referenceLinkLibraryDependencies(prj, ref)
|
||||||
|
p.w('<LinkLibraryDependencies>true</LinkLibraryDependencies>')
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function m.referenceOutputAssembly(prj, ref)
|
||||||
|
p.w('<ReferenceOutputAssembly>true</ReferenceOutputAssembly>')
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function m.referencePrivate(prj, ref)
|
||||||
|
p.w('<Private>true</Private>')
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function m.referenceProject(prj, ref)
|
||||||
|
p.w('<Project>{%s}</Project>', ref.uuid)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function m.referenceUseLibraryDependences(prj, ref)
|
||||||
|
p.w('<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>')
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
function m.resourceAdditionalIncludeDirectories(cfg)
|
function m.resourceAdditionalIncludeDirectories(cfg)
|
||||||
m.additionalIncludeDirectories(cfg, table.join(cfg.includedirs, cfg.resincludedirs))
|
m.additionalIncludeDirectories(cfg, table.join(cfg.includedirs, cfg.resincludedirs))
|
||||||
|
@ -75,3 +75,25 @@
|
|||||||
]]
|
]]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Managed C++ projects write out references a little differently.
|
||||||
|
--
|
||||||
|
|
||||||
|
function suite.referencesAreRelative_onDifferentProjectLocation()
|
||||||
|
links { "MyProject" }
|
||||||
|
flags { "Managed" }
|
||||||
|
prepare()
|
||||||
|
test.capture [[
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="MyProject.vcxproj">
|
||||||
|
<Project>{00112233-4455-6677-8888-99AABBCCDDEE}</Project>
|
||||||
|
<Private>true</Private>
|
||||||
|
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
|
||||||
|
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
|
||||||
|
<LinkLibraryDependencies>true</LinkLibraryDependencies>
|
||||||
|
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
]]
|
||||||
|
end
|
||||||
|
Reference in New Issue
Block a user