Skip to content

[core] Update CMake to use TARGET_SDKS for Android #5095

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions stdlib/public/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,8 @@ if(SWIFT_CHECK_ESSENTIAL_STDLIB)
target_link_libraries(swift_stdlib_essential ${RUNTIME_DEPENDENCY})
endif()

add_swift_library(swiftCore ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} IS_STDLIB IS_STDLIB_CORE
set(swift_core_common_library_parameters
swiftCore ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} IS_STDLIB IS_STDLIB_CORE
${SWIFTLIB_SOURCES}
# The copy_shim_headers target dependency is required to let the
# build system know that there's a rule to produce the shims
Expand All @@ -224,5 +225,17 @@ add_swift_library(swiftCore ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} IS_STDLIB IS_STD
LINK_FLAGS ${swift_core_link_flags}
PRIVATE_LINK_LIBRARIES ${swift_core_private_link_libraries}
INCORPORATE_OBJECT_LIBRARIES swiftRuntime swiftStdlibStubs
INSTALL_IN_COMPONENT stdlib
)

add_swift_library(
${swift_core_common_library_parameters}
FRAMEWORK_DEPENDS ${swift_core_framework_depends}
INSTALL_IN_COMPONENT stdlib)
TARGET_SDKS ALL_APPLE_PLATFORMS
)

add_swift_library(
${swift_core_common_library_parameters}
TARGET_SDKS ANDROID CYGWIN FREEBSD LINUX
)