Skip to content

Commit

Permalink
More explicit LINKER_LANGUAGE properties
Browse files Browse the repository at this point in the history
  • Loading branch information
tristanlabelle committed Sep 23, 2024
1 parent b8ec1ea commit dac56d6
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Generator/Sources/SwiftWinRT/writeProjectionFiles.swift
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,13 @@ fileprivate func writeNamespaceModuleFiles(_ module: Module, directoryPath: Stri
writer.writeAddLibrary(targetName, .static, ["Aliases.swift"])
if targetName != namespaceModuleName {
writer.writeSingleLineCommand(
"set_target_properties", .unquoted(targetName),
"PROPERTIES", "Swift_MODULE_NAME", .unquoted(namespaceModuleName))
"set_target_properties", .autoquote(targetName),
"PROPERTIES", "Swift_MODULE_NAME", .autoquote(namespaceModuleName))
// Workaround CMake error with mismatching module names:
// "CMake can not determine linker language for target: <blah>"
writer.writeSingleLineCommand(
"set_target_properties", .autoquote(targetName),
"PROPERTIES", "LINKER_LANGUAGE", "Swift")
}
writer.writeTargetLinkLibraries(targetName, .public, [ cmakeOptions.getTargetName(moduleName: module.name) ])
}
Expand Down

0 comments on commit dac56d6

Please sign in to comment.