Hmm, the check requiring imported targets to have a specific imported configuration seems overly aggressive. The clang-resource-headers doesn't specify which configurations it needs to be included with.
Could you try copying this diff:
diff --git a/cmake/modules/SwiftXcodeSupport.cmake diff --git a/cmake/modules/SwiftXcodeSupport.cmake b/cmake/modules/SwiftXcodeSupport.cmake
index ed0d4f3a15d..2fd509046ee 100644
--- a/cmake/modules/SwiftXcodeSupport.cmake
+++ b/cmake/modules/SwiftXcodeSupport.cmake
@@ -10,21 +10,22 @@ function(escape_path_for_xcode config path result_var_name)
# Hack to deal with the fact that paths contain the build-time
# variables. Note that this fix is Xcode-specific.
string(REPLACE "$(CONFIGURATION)" "${config}" result "${path}")
string(REPLACE "$(EFFECTIVE_PLATFORM_NAME)" "" result "${result}")
set("${result_var_name}" "${result}" PARENT_SCOPE)
endfunction()
function(check_imported_target_has_imported_configuration target config)
get_target_property(IMPORTED_CONFIGS_LIST ${target} IMPORTED_CONFIGURATIONS)
- if ("${IMPORTED_CONFIGS_LIST}" STREQUAL "IMPORTED_CONFIGS_LIST-NOTFOUND")
+ if ("${IMPORTED_CONFIGS_LIST}" STREQUAL "IMPORTED_CONFIGS_LIST-NOTFOUND"
+ AND NOT ${target} STREQUAL "clang-resource-headers")
message(FATAL_ERROR "No import configuration of ${target} specified?!")
endif()
if(NOT "${config}" IN_LIST IMPORTED_CONFIGS_LIST)
message(FATAL_ERROR "${target} does not have imported config '${config}'?! Instead: ${IMPORTED_CONFIGS_LIST}")
endif()
endfunction()
function(fixup_imported_target_property_for_xcode target property llvm_build_type)
set(FULL_PROP_NAME "${property}_${llvm_build_type}")
and running pbpaste | git apply from within the Swift compiler repo.
Please verify that it configures (I expect that it will) and gives you the expected Xcode experience. Thanks.
The README could probably be a bit clearer there, but ./swift-xcodegen is assuming you're in the utils/swift-xcodegen folder. utils/generate-xcode directly runs it though, so it's better to use that instead.