Skip to content
Draft
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ set(COLLECTIONS_SINGLE_MODULE YES)
set(COLLECTIONS_FOUNDATION_TOOLCHAIN_MODULE YES)

set(SwiftFoundation_MACRO "" CACHE STRING "Path to Foundation macro plugin")
set(USE_PREBUILT_SDK NO CACHE BOOL "A full prebuilt SDK is available, so use its headers")

# Make sure our dependencies exists
include(FetchContent)
Expand Down
9 changes: 6 additions & 3 deletions Sources/_FoundationCShims/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,13 @@ add_library(_FoundationCShims STATIC
string_shims.c
uuid.c)

target_include_directories(_FoundationCShims PUBLIC include)

target_compile_options(_FoundationCShims INTERFACE
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-Xcc -fmodule-map-file=${CMAKE_CURRENT_SOURCE_DIR}/include/module.modulemap>")
if(NOT USE_PREBUILT_SDK)
target_include_directories(_FoundationCShims PUBLIC include)

target_compile_options(_FoundationCShims INTERFACE
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-Xcc -fmodule-map-file=${CMAKE_CURRENT_SOURCE_DIR}/include/module.modulemap>")
endif()

set_property(GLOBAL APPEND PROPERTY SWIFT_FOUNDATION_EXPORTS _FoundationCShims)

Expand Down
Loading