File tree 2 files changed +17
-8
lines changed
tools/swift-plugin-server
2 files changed +17
-8
lines changed Original file line number Diff line number Diff line change @@ -269,7 +269,8 @@ function(add_pure_swift_host_tool name)
269
269
270
270
# Option handling
271
271
set (options )
272
- set (single_parameter_options)
272
+ set (single_parameter_options
273
+ SWIFT_COMPONENT)
273
274
set (multiple_parameter_options
274
275
DEPENDENCIES
275
276
SWIFT_DEPENDENCIES)
@@ -323,6 +324,17 @@ function(add_pure_swift_host_tool name)
323
324
target_include_directories (${name} PUBLIC
324
325
${SWIFT_HOST_LIBRARIES_DEST_DIR} )
325
326
326
- # Export this target.
327
- set_property (GLOBAL APPEND PROPERTY SWIFT_EXPORTS ${name} )
327
+ if (NOT APSHT_SWIFT_COMPONENT STREQUAL no_component)
328
+ add_dependencies (${APSHT_SWIFT_COMPONENT} ${name} )
329
+ swift_install_in_component(TARGETS ${name}
330
+ COMPONENT ${APSHT_SWIFT_COMPONENT}
331
+ RUNTIME DESTINATION bin)
332
+ swift_is_installing_component(${APSHT_SWIFT_COMPONENT} is_installing)
333
+ endif ()
334
+
335
+ if (NOT is_installing)
336
+ set_property (GLOBAL APPEND PROPERTY SWIFT_BUILDTREE_EXPORTS ${name} )
337
+ else ()
338
+ set_property (GLOBAL APPEND PROPERTY SWIFT_EXPORTS ${name} )
339
+ endif ()
328
340
endfunction ()
Original file line number Diff line number Diff line change @@ -16,6 +16,8 @@ if (SWIFT_SWIFT_PARSER)
16
16
DEPENDENCIES
17
17
swiftDemangling
18
18
$<TARGET_OBJECTS:_swiftCSwiftPluginServer>
19
+ SWIFT_COMPONENT
20
+ compiler
19
21
SWIFT_DEPENDENCIES
20
22
SwiftSyntax::SwiftSyntaxMacros
21
23
SwiftSyntax::SwiftSyntaxMacroExpansion
@@ -25,9 +27,4 @@ if (SWIFT_SWIFT_PARSER)
25
27
target_include_directories (swift-plugin-server PRIVATE
26
28
Sources /CSwiftPluginServer/include
27
29
)
28
- swift_install_in_component(TARGETS swift-plugin-server
29
- RUNTIME
30
- DESTINATION bin
31
- COMPONENT compiler
32
- )
33
30
endif ()
You can’t perform that action at this time.
0 commit comments