-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support Apple's Swift Package Manager
**Reason** - Main way to develop under Apple's platforms is using SPM **Changes** - Added Package.swift - Added _SwiftPackageManagerFile.cpp to single_include/nlohmann in order SPM to see it as a C++ source file - Added .build to .gitignore **Context** - SPM is a package manager for Swift and C-based languages. It is the main way to develop under Apple's platforms. It is also used to build Swift packages for Linux.
- Loading branch information
Aleksei
committed
May 26, 2023
1 parent
a0c1318
commit 3313f7d
Showing
4 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,3 +39,6 @@ | |
/localhost.pem | ||
/localhost-key.pem | ||
/serve_header.yml | ||
|
||
# Swift Package Manager build directory | ||
/.build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// swift-tools-version: 5.7 | ||
// The swift-tools-version declares the minimum version of Swift required to build this package. | ||
|
||
import PackageDescription | ||
|
||
let package = Package( | ||
name: "nlohmann-json", | ||
platforms: [ | ||
.iOS(.v11), .macOS(.v10_13), .tvOS(.v11), .watchOS(.v4) | ||
], | ||
products: [ | ||
.library(name: "nlohmann-json", targets: ["nlohmann-json"]) | ||
], | ||
targets: [ | ||
.target( | ||
name: "nlohmann-json", | ||
path: "single_include/nlohmann", | ||
publicHeadersPath: "." | ||
) | ||
], | ||
cxxLanguageStandard: .cxx11 | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// Umbrella source file for the Swift Package Manager | ||
|
||
#include <json.hpp> |