@@ -1869,32 +1869,30 @@ function(add_swift_library name)
1869
1869
set (resource_dir_sdk_subdir "${SWIFT_SDK_${sdk} _LIB_SUBDIR}" )
1870
1870
precondition (resource_dir_sdk_subdir )
1871
1871
1872
- if (SWIFTLIB_TARGET_LIBRARY )
1873
- if (SWIFTLIB_SHARED )
1874
- set (resource_dir "swift" )
1875
- set (file_permissions
1876
- OWNER_READ OWNER_WRITE OWNER_EXECUTE
1877
- GROUP_READ GROUP_EXECUTE
1878
- WORLD_READ WORLD_EXECUTE )
1879
- else ()
1880
- set (resource_dir "swift_static" )
1881
- set (file_permissions
1882
- OWNER_READ OWNER_WRITE
1883
- GROUP_READ
1884
- WORLD_READ )
1885
- endif ()
1872
+ if (SWIFTLIB_SHARED )
1873
+ set (resource_dir "swift" )
1874
+ set (file_permissions
1875
+ OWNER_READ OWNER_WRITE OWNER_EXECUTE
1876
+ GROUP_READ GROUP_EXECUTE
1877
+ WORLD_READ WORLD_EXECUTE )
1878
+ else ()
1879
+ set (resource_dir "swift_static" )
1880
+ set (file_permissions
1881
+ OWNER_READ OWNER_WRITE
1882
+ GROUP_READ
1883
+ WORLD_READ )
1884
+ endif ()
1886
1885
1887
- swift_install_in_component ("${SWIFTLIB_INSTALL_IN_COMPONENT} "
1888
- FILES "${UNIVERSAL_LIBRARY_NAME} "
1889
- DESTINATION "lib${LLVM_LIBDIR_SUFFIX} /${resource_dir} /${resource_dir_sdk_subdir} "
1890
- PERMISSIONS ${file_permissions} )
1891
- swift_is_installing_component ("${SWIFTLIB_INSTALL_IN_COMPONENT} " is_installing )
1886
+ swift_install_in_component ("${SWIFTLIB_INSTALL_IN_COMPONENT} "
1887
+ FILES "${UNIVERSAL_LIBRARY_NAME} "
1888
+ DESTINATION "lib${LLVM_LIBDIR_SUFFIX} /${resource_dir} /${resource_dir_sdk_subdir} "
1889
+ PERMISSIONS ${file_permissions} )
1890
+ swift_is_installing_component ("${SWIFTLIB_INSTALL_IN_COMPONENT} " is_installing )
1892
1891
1893
- if (NOT is_installing )
1894
- set_property (GLOBAL APPEND PROPERTY SWIFT_BUILDTREE_EXPORTS ${VARIANT_NAME} )
1895
- else ()
1896
- set_property (GLOBAL APPEND PROPERTY SWIFT_EXPORTS ${VARIANT_NAME} )
1897
- endif ()
1892
+ if (NOT is_installing )
1893
+ set_property (GLOBAL APPEND PROPERTY SWIFT_BUILDTREE_EXPORTS ${VARIANT_NAME} )
1894
+ else ()
1895
+ set_property (GLOBAL APPEND PROPERTY SWIFT_EXPORTS ${VARIANT_NAME} )
1898
1896
endif ()
1899
1897
1900
1898
# If we built static variants of the library, create a lipo target for
@@ -1928,26 +1926,24 @@ function(add_swift_library name)
1928
1926
1929
1927
# Add Swift standard library targets as dependencies to the top-level
1930
1928
# convenience target.
1931
- if (SWIFTLIB_TARGET_LIBRARY )
1932
- set (FILTERED_UNITTESTS
1933
- swiftStdlibCollectionUnittest
1934
- swiftStdlibUnicodeUnittest )
1935
-
1936
- foreach (arch ${SWIFT_SDK_${sdk}_ARCHITECTURES} )
1937
- set (VARIANT_SUFFIX "-${SWIFT_SDK_${sdk} _LIB_SUBDIR}-${arch} " )
1938
- if (TARGET "swift-stdlib${VARIANT_SUFFIX} " AND
1939
- TARGET "swift-test-stdlib${VARIANT_SUFFIX} " )
1940
- add_dependencies ("swift-stdlib${VARIANT_SUFFIX} "
1929
+ set (FILTERED_UNITTESTS
1930
+ swiftStdlibCollectionUnittest
1931
+ swiftStdlibUnicodeUnittest )
1932
+
1933
+ foreach (arch ${SWIFT_SDK_${sdk}_ARCHITECTURES} )
1934
+ set (VARIANT_SUFFIX "-${SWIFT_SDK_${sdk} _LIB_SUBDIR}-${arch} " )
1935
+ if (TARGET "swift-stdlib${VARIANT_SUFFIX} " AND
1936
+ TARGET "swift-test-stdlib${VARIANT_SUFFIX} " )
1937
+ add_dependencies ("swift-stdlib${VARIANT_SUFFIX} "
1938
+ ${lipo_target}
1939
+ ${lipo_target_static} )
1940
+ if (NOT "${name} " IN_LIST FILTERED_UNITTESTS )
1941
+ add_dependencies ("swift-test-stdlib${VARIANT_SUFFIX} "
1941
1942
${lipo_target}
1942
1943
${lipo_target_static} )
1943
- if (NOT "${name} " IN_LIST FILTERED_UNITTESTS )
1944
- add_dependencies ("swift-test-stdlib${VARIANT_SUFFIX} "
1945
- ${lipo_target}
1946
- ${lipo_target_static} )
1947
- endif ()
1948
1944
endif ()
1949
- endforeach ()
1950
- endif ()
1945
+ endif ()
1946
+ endforeach ()
1951
1947
endif ()
1952
1948
endforeach ()
1953
1949
else ()
0 commit comments