-
Notifications
You must be signed in to change notification settings - Fork 10.4k
/
Copy pathCMakeLists.txt
51 lines (44 loc) · 1.56 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
add_swift_host_tool(swift
api_notes.cpp
driver.cpp
autolink_extract_main.cpp
modulewrap_main.cpp
swift_format_main.cpp
LINK_LIBRARIES
swiftDriver
swiftFrontendTool
LLVM_COMPONENT_DEPENDS
DebugInfoCodeView
SWIFT_COMPONENT compiler
)
if(HAVE_UNICODE_LIBEDIT)
target_link_libraries(swift edit)
endif()
swift_create_post_build_symlink(swift
SOURCE "swift${CMAKE_EXECUTABLE_SUFFIX}"
DESTINATION "swiftc${CMAKE_EXECUTABLE_SUFFIX}"
WORKING_DIRECTORY "${SWIFT_RUNTIME_OUTPUT_INTDIR}")
swift_create_post_build_symlink(swift
SOURCE "swift${CMAKE_EXECUTABLE_SUFFIX}"
DESTINATION "swift-format${CMAKE_EXECUTABLE_SUFFIX}"
WORKING_DIRECTORY "${SWIFT_RUNTIME_OUTPUT_INTDIR}")
swift_create_post_build_symlink(swift
SOURCE "swift${CMAKE_EXECUTABLE_SUFFIX}"
DESTINATION "swift-autolink-extract${CMAKE_EXECUTABLE_SUFFIX}"
WORKING_DIRECTORY "${SWIFT_RUNTIME_OUTPUT_INTDIR}")
add_swift_tool_symlink(swiftc swift compiler)
add_swift_tool_symlink(swift-autolink-extract swift autolink-driver)
add_swift_tool_symlink(swift-format swift editor-integration)
# If building as part of clang, make sure the headers are installed.
if(NOT SWIFT_BUILT_STANDALONE)
add_dependencies(swift clang-headers)
endif()
swift_install_in_component(compiler
FILES "${SWIFT_RUNTIME_OUTPUT_INTDIR}/swiftc"
DESTINATION "bin")
swift_install_in_component(autolink-driver
FILES "${SWIFT_RUNTIME_OUTPUT_INTDIR}/swift-autolink-extract"
DESTINATION "bin")
swift_install_in_component(editor-integration
FILES "${SWIFT_RUNTIME_OUTPUT_INTDIR}/swift-format"
DESTINATION "bin")