Skip to content

Commit

Permalink
Adding multiple libraries for ObjC.
Browse files Browse the repository at this point in the history
  • Loading branch information
tonystone committed Apr 7, 2022
1 parent eb8948d commit c8714a6
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 9 deletions.
43 changes: 35 additions & 8 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// swift-tools-version:5.0
// swift-tools-version:5.3
// The swift-tools-version declares the minimum version of Swift required to build this package.
///
/// Package.swift
///
Expand All @@ -22,17 +23,43 @@ import PackageDescription

let package = Package(
name: "TraceLog",
platforms: [.iOS(.v9), .macOS(.v10_13), .tvOS(.v9), .watchOS(.v2)],
products: [
.library(
name: "TraceLog",
type: .dynamic,
targets: ["TraceLog"]
),
.library(
name: "TraceLogObjC",
targets: ["TraceLogObjC"]
)],
targets: [
/// Module targets
.target(name: "TraceLog", dependencies: [], path: "Sources/TraceLog"),
.target(name: "TraceLogObjC", dependencies: ["TraceLog"], path: "Sources/TraceLogObjC"),
.target(name: "TraceLog",
dependencies: [],
path: "Sources/TraceLog"),
.target(name: "TraceLogObjC",
dependencies: ["TraceLog"],
path: "Sources/TraceLogObjC",
publicHeadersPath: "include",
cSettings: [
.headerSearchPath("../.."),
]),

/// Tests
.testTarget(name: "TraceLogTests", dependencies: ["TraceLog"], path: "Tests/TraceLogTests"),
.testTarget(name: "TraceLogObjCTests", dependencies: ["TraceLogObjC"], path: "Tests/TraceLogObjCTests")
.testTarget(name: "TraceLogTests",
dependencies: ["TraceLog"],
path: "Tests/TraceLogTests",
exclude: ["Internal/Utilities/Streams/FileOutputStreamError+PosixTests.swift.gyb",
"Internal/Utilities/Streams/OutputStreamError+PosixTests.swift.gyb",
"Writers & Formatters/Textformat+EncodingTests.swift.gyb",
"Writers & Formatters/TextFormat+InternationalLanguagesTests.swift.gyb",
"Writers & Formatters/FileStrategyManager+FailureReasonTests.swift.gyb"]),
.testTarget(name: "TraceLogObjCTests",
dependencies: ["TraceLogObjC"],
path: "Tests/TraceLogObjCTests",
exclude: [])
],
swiftLanguageVersions: [.version("5")]
)

/// Main products section
package.products.append(.library(name: "TraceLog", type: .dynamic, targets: ["TraceLog", "TraceLogObjC"]))
File renamed without changes.
2 changes: 1 addition & 1 deletion Tests/TraceLogObjCTests/TraceLogObjCTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*/
@import XCTest;

#import "TraceLog.h"
#import <TraceLog/TraceLog.h>

@interface TraceLogObjCTests : XCTestCase
@end
Expand Down

0 comments on commit c8714a6

Please sign in to comment.