-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
43 lines (39 loc) · 1.23 KB
/
CMakeLists.txt
File metadata and controls
43 lines (39 loc) · 1.23 KB
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
# This source file is part of the Swift open source project
#
# Copyright (c) 2021-2025 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
# See http://swift.org/CONTRIBUTORS.txt for Swift project authors
add_library(PackagePlugin
ArgumentExtractor.swift
Command.swift
Context.swift
Diagnostics.swift
Errors.swift
PackageManagerProxy.swift
PackageModel.swift
Path.swift
Plugin.swift
PluginContextDeserializer.swift
PluginMessages.swift
Protocols.swift
Utilities.swift)
if(APPLE)
target_link_options(PackagePlugin PRIVATE
"SHELL:-Xlinker -install_name -Xlinker @rpath/libPackagePlugin.dylib")
else()
target_link_libraries(PackagePlugin PRIVATE
Foundation)
endif()
install(TARGETS PackagePlugin
DESTINATION ${CMAKE_INSTALL_LIBDIR}/swift/pm/PluginAPI)
if(MSVC)
install(FILES $<TARGET_FILE_DIR:PackagePlugin>/$<TARGET_FILE_BASE_NAME:PackagePlugin>.pdb
DESTINATION ${CMAKE_INSTALL_LIBDIR}/swift/pm/PluginAPI
OPTIONAL)
endif()
set(SwiftPMRuntime_INSTALL_SWIFTMODULEDIR
${CMAKE_INSTALL_LIBDIR}/swift/pm/PluginAPI)
emit_swift_interface(PackagePlugin)
install_swift_interface(PackagePlugin)