Skip to content

Commit

Permalink
Merge InternalABI module in COM_ABI target
Browse files Browse the repository at this point in the history
  • Loading branch information
tristanlabelle committed Oct 2, 2024
1 parent d768c9e commit 3af3006
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 16 deletions.
7 changes: 1 addition & 6 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,13 @@ let package = Package(
dependencies: ["COM_ABI"],
path: "Support/Sources/WindowsRuntime_ABI",
exclude: ["CMakeLists.txt"]),
.target(
name: "COM_InternalABI",
dependencies: ["COM_ABI", "WindowsRuntime_ABI"],
path: "Support/Sources/COM_InternalABI",
exclude: ["CMakeLists.txt"]),
.target(
name: "ABIBindings",
path: "Support/Sources/ABIBindings",
exclude: ["CMakeLists.txt"]),
.target(
name: "COM",
dependencies: ["ABIBindings", "COM_ABI", "COM_InternalABI"],
dependencies: ["ABIBindings", "COM_ABI"],
path: "Support/Sources/COM",
exclude: ["CMakeLists.txt"]),
.target(
Expand Down
1 change: 0 additions & 1 deletion Support/Sources/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
add_subdirectory(COM_ABI)
add_subdirectory(COM_InternalABI)
add_subdirectory(WindowsRuntime_ABI)

add_subdirectory(ABIBindings)
Expand Down
1 change: 0 additions & 1 deletion Support/Sources/COM/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
file(GLOB_RECURSE SOURCES *.swift)
add_library(COM STATIC ${SOURCES})
target_link_libraries(COM PUBLIC ABIBindings COM_ABI)
target_link_libraries(COM PRIVATE COM_InternalABI)
# Workaround for https://gitlab.kitware.com/cmake/cmake/-/issues/26346
target_include_directories(COM INTERFACE "${CMAKE_CURRENT_BINARY_DIR}")
2 changes: 1 addition & 1 deletion Support/Sources/COM/COMEmbedding.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import COM_ABI
import SWRT_SwiftCOMObject
import COM_PrivateABI

/// Protocol for Swift objects which embed COM interfaces.
public protocol COMEmbedderWithDelegatedImplementation: IUnknownProtocol {
Expand Down
5 changes: 5 additions & 0 deletions Support/Sources/COM_ABI/include/module.modulemap
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@ module COM_ABI {
header "SWRT/windows/wtypes.h"
export *
}

module COM_PrivateABI {
header "SwiftCOMObject.h"
export *
}
3 changes: 0 additions & 3 deletions Support/Sources/COM_InternalABI/CMakeLists.txt

This file was deleted.

4 changes: 0 additions & 4 deletions Support/Sources/COM_InternalABI/include/module.modulemap

This file was deleted.

0 comments on commit 3af3006

Please sign in to comment.