Files
swift-mirror/stdlib/toolchain/CompatibilityDynamicReplacements/CMakeLists.txt
Eric Miotto 717eeb912d [build] specify deployment targets for compatibility libraries (#31473)
This is needed in situations where the minimum deployment target is
specified in build-script -- these libraries do not to obey to that
since we need to ensure we are able to back deploy those correctly.

Addresses rdar://59249988
2020-05-04 08:22:35 -07:00

33 lines
1.1 KiB
CMake

set(library_name "swiftCompatibilityDynamicReplacements")
add_swift_target_library("${library_name}" STATIC
DynamicReplaceable.cpp
TARGET_SDKS ${SWIFT_APPLE_PLATFORMS}
C_COMPILE_FLAGS ${CXX_COMPILE_FLAGS}
LINK_FLAGS ${CXX_LINK_FLAGS}
SWIFT_COMPILE_FLAGS ${SWIFT_STANDARD_LIBRARY_SWIFT_FLAGS}
DEPLOYMENT_VERSION_OSX ${COMPATIBILITY_MINIMUM_DEPLOYMENT_VERSION_OSX}
DEPLOYMENT_VERSION_IOS ${COMPATIBILITY_MINIMUM_DEPLOYMENT_VERSION_IOS}
DEPLOYMENT_VERSION_TVOS ${COMPATIBILITY_MINIMUM_DEPLOYMENT_VERSION_TVOS}
DEPLOYMENT_VERSION_WATCHOS ${COMPATIBILITY_MINIMUM_DEPLOYMENT_VERSION_WATCHOS}
INSTALL_IN_COMPONENT compiler
INSTALL_WITH_SHARED)
# FIXME: We need a more flexible mechanism to add lipo targets generated by
# add_swift_target_library to the ALL target. Until then this hack is necessary
# to ensure these libraries build.
foreach(sdk ${SWIFT_SDKS})
set(target_name "${library_name}-${SWIFT_SDK_${sdk}_LIB_SUBDIR}")
if(NOT TARGET "${target_name}")
continue()
endif()
set_target_properties("${target_name}"
PROPERTIES
EXCLUDE_FROM_ALL FALSE)
endforeach()