stdlib: adjust the name for static libraries on Windows

Windows names static libraries with a `lib` prefix and a `lib` suffix.
This differentiates them from the import libraries which have no prefix
and a `lib` suffix.  This adjustment enables the parallel installation
of import libraries and static library variants for a given module.
This is required to support static and dynamic library co-existence in
Swift.
This commit is contained in:
Saleem Abdulrasool
2023-08-04 13:19:11 -07:00
parent 62bd4f2b5f
commit ef037a418b

View File

@@ -1080,6 +1080,10 @@ function(add_swift_target_library_single target name)
target_include_directories("${target}" SYSTEM PRIVATE
${SWIFTLIB_INCLUDE})
endif()
if(libkind STREQUAL STATIC)
set_property(TARGET "${target}" PROPERTY
PREFIX lib)
endif()
endif()
if("${SWIFTLIB_SINGLE_SDK}" STREQUAL "WINDOWS" AND NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")