From 596e437e9d53f3aa22c5191ca1c12740b9b6894c Mon Sep 17 00:00:00 2001 From: Jeremy Schonfeld Date: Fri, 26 Jul 2024 11:46:19 -0700 Subject: [PATCH] Add explicit modulemap path to take priority over modulemap from SDK --- Sources/_FoundationCShims/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Sources/_FoundationCShims/CMakeLists.txt b/Sources/_FoundationCShims/CMakeLists.txt index ef2a7fe22..1798a5bb0 100644 --- a/Sources/_FoundationCShims/CMakeLists.txt +++ b/Sources/_FoundationCShims/CMakeLists.txt @@ -19,6 +19,9 @@ add_library(_FoundationCShims STATIC target_include_directories(_FoundationCShims PUBLIC include) +target_compile_options(_FoundationCShims INTERFACE + "$<$:SHELL:-Xcc -fmodule-map-file=${CMAKE_CURRENT_SOURCE_DIR}/include/module.modulemap>") + set_property(GLOBAL APPEND PROPERTY SWIFT_FOUNDATION_EXPORTS _FoundationCShims) if(BUILD_SHARED_LIBS)