Skip to content

Commit 941b171

Browse files
committed
build: temporary staging changes for integration changes
This set of change is less than ideal. However, this is the last piece to make the generated toolchain image currently the same with the old build system. With this in plae, we can finally switch over to CMake.
1 parent 2ea50b5 commit 941b171

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-4
lines changed

CMakeLists.txt

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -432,22 +432,34 @@ if(ENABLE_TESTING)
432432
${CMAKE_CURRENT_BINARY_DIR}/TestFoundation/xdgTestHelper${CMAKE_EXECUTABLE_SUFFIX})
433433
endif()
434434

435-
get_swift_host_arch(SWIFT_HOST_ARCH)
435+
string(TOLOWER ${CMAKE_SYSTEM_NAME} swift_os)
436+
get_swift_host_arch(swift_arch)
436437

438+
# TODO(compnerd) honour lib vs lib64
437439
install(FILES
438440
${CMAKE_CURRENT_BINARY_DIR}/swift/Foundation.swiftdoc
439441
${CMAKE_CURRENT_BINARY_DIR}/swift/Foundation.swiftmodule
440442
DESTINATION
441-
${CMAKE_INSTALL_FULL_LIBDIR}/swift/${CMAKE_SYSTEM_NAME}/${SWIFT_HOST_ARCH})
443+
lib/swift/${swift_os}/${swift_arch})
442444
install(FILES
443445
${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}Foundation${CMAKE_SHARED_LIBRARY_SUFFIX}
444446
DESTINATION
445-
${CMAKE_INSTALL_FULL_LIBDIR})
447+
lib/swift/${swift_os})
448+
# TODO(compnerd) install as a Framework as that is how swift actually is built
449+
install(DIRECTORY
450+
${install_dir}/System/Library/Frameworks/CoreFoundation.framework/Headers/
451+
DESTINATION
452+
lib/swift/CoreFoundation
453+
FILES_MATCHING PATTERN "*.h")
454+
install(FILES
455+
CoreFoundation/Base.subproj/module.map
456+
DESTINATION
457+
lib/swift/CoreFoundation)
446458
if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
447459
install(FILES
448460
${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}Foundation${CMAKE_SHARED_LIBRARY_SUFFIX}
449461
DESTINATION
450-
${CMAKE_INSTALL_FULL_LIBDIR}/swift/${CMAKE_SYSTEM_NAME}/${SWIFT_HOST_ARCH})
462+
lib/swift/${swift_os}/${swift_arch})
451463
endif()
452464
install(FILES
453465
${CMAKE_CURRENT_BINARY_DIR}/plutil
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module CoreFoundation [extern_c] [system] {
2+
umbrella header "CoreFoundation.h"
3+
explicit module CFPlugInCOM { header "CFPlugInCOM.h" }
4+
}

0 commit comments

Comments
 (0)