Files
swift-mirror/tools/swift-plugin-server/CMakeLists.txt
Rintaro Ishizaki 5fe2ead4e2 [Madros] Update for SwiftSyntaxMacroExpansion module
Share the same expansion logic between ASTGen and
SwiftCompilerMessageHandling
2023-05-11 19:45:14 -07:00

34 lines
1.0 KiB
CMake

if (SWIFT_SWIFT_PARSER)
# _swiftCSwiftPluginServer is just a C support library for swift-plugin-server
# Don't bother to create '.a' for that.
add_swift_host_library(_swiftCSwiftPluginServer OBJECT
Sources/CSwiftPluginServer/PluginServer.cpp
)
target_link_libraries(_swiftCSwiftPluginServer PRIVATE
swiftDemangling
)
target_include_directories(_swiftCSwiftPluginServer PUBLIC
Sources/CSwiftPluginServer/include
)
add_pure_swift_host_tool(swift-plugin-server
Sources/swift-plugin-server/swift-plugin-server.swift
DEPENDENCIES
swiftDemangling
$<TARGET_OBJECTS:_swiftCSwiftPluginServer>
SWIFT_DEPENDENCIES
SwiftSyntax::SwiftSyntaxMacros
SwiftSyntax::SwiftSyntaxMacroExpansion
SwiftSyntax::SwiftCompilerPluginMessageHandling
swiftLLVMJSON
)
target_include_directories(swift-plugin-server PRIVATE
Sources/CSwiftPluginServer/include
)
swift_install_in_component(TARGETS swift-plugin-server
RUNTIME
DESTINATION bin
COMPONENT compiler
)
endif()