Skip to content

Commit ccfa499

Browse files
committed
Android: treat module similar to WinSDK
Setup the interface include directory that seems to not be setup implicitly by CMake as it should be. This workaround is necessary to ensure that we are able to build against this module.
1 parent 94cf963 commit ccfa499

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Runtimes/Overlay/Android/Android/CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,15 @@ set_target_properties(swiftAndroid PROPERTIES
1111
Swift_MODULE_NAME Android)
1212
target_compile_definitions(swiftAndroid PRIVATE
1313
$<$<BOOL:${SwiftOverlay_ENABLE_REFLECTION}>:SWIFT_ENABLE_REFLECTION>)
14+
target_link_libraries(swiftAndroid PUBLIC
15+
SwiftAndroid)
1416
target_link_libraries(swiftAndroid PRIVATE
15-
SwiftAndroid
1617
swiftCore)
1718

19+
# FIXME: Why is this not implicitly in the interface flags?
20+
target_include_directories(swiftAndroid INTERFACE
21+
"$<$<COMPILE_LANGUAGE:Swift>:$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/${SwiftCore_INSTALL_SWIFTMODULEDIR}>>")
22+
1823
install(TARGETS swiftAndroid
1924
EXPORT SwiftOverlayTargets
2025
ARCHIVE DESTINATION "${SwiftOverlay_INSTALL_LIBDIR}"

0 commit comments

Comments
 (0)