Skip to content

Commit 3c90576

Browse files
committed
cmake: fix Xcode project generation to include all header files.
This was broken by commit cf1f240. This commit reverts the 2 lines which broke the inclusion of header files in the generated Xcode project.
1 parent ac56f03 commit 3c90576

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cmake/modules/AddSwift.cmake

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -435,8 +435,9 @@ function(add_swift_host_library name)
435435
endif()
436436

437437
if(XCODE)
438-
get_filename_component(dir ${CMAKE_CURRENT_SOURCE_DIR} DIRECTORY)
439-
438+
string(REGEX MATCHALL "/[^/]+" split_path ${CMAKE_CURRENT_SOURCE_DIR})
439+
list(GET split_path -1 dir)
440+
440441
file(GLOB_RECURSE ASHL_HEADERS
441442
${SWIFT_SOURCE_DIR}/include/swift${dir}/*.h
442443
${SWIFT_SOURCE_DIR}/include/swift${dir}/*.def

0 commit comments

Comments
 (0)