Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: nlohmann/json
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: develop
Choose a base ref
...
head repository: wu-hui/json
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: develop
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.
  • 5 commits
  • 3 files changed
  • 1 contributor

Commits on Mar 7, 2021

  1. Add podspec

    wu-hui committed Mar 7, 2021
    Copy the full SHA
    6fc9a29 View commit details
  2. Add package.swift

    wu-hui committed Mar 7, 2021
    Copy the full SHA
    630df1b View commit details

Commits on Mar 8, 2021

  1. Fix package

    wu-hui committed Mar 8, 2021
    Copy the full SHA
    4c44799 View commit details
  2. New build

    wu-hui committed Mar 8, 2021
    Copy the full SHA
    81a0165 View commit details
  3. Update version

    wu-hui committed Mar 8, 2021
    Copy the full SHA
    7b8dbf8 View commit details
Showing with 79 additions and 0 deletions.
  1. +24 −0 Package.swift
  2. +54 −0 nlohmann_json.podspec
  3. +1 −0 spm_build.cc
24 changes: 24 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// swift-tools-version:5.0
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription

let package = Package(
name: "nlohmann_json",
products: [
.library(
name: "nlohmann_json",
targets: ["nlohmann_json"]
)
],

targets: [
.target(
name: "nlohmann_json",
path: ".",
sources: [
"spm_build.cc"
],
publicHeadersPath: "single_include"
)
]
)
54 changes: 54 additions & 0 deletions nlohmann_json.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Below is copied from existing podspec in official cocoapods repo, with added
# platform support for macOS and tvOS.

# ---- Original podspec begins here

# upgrades how to:
# 1. update s.version
# 2. run `pod spec lint nlohmann_json.podspec`
# 3. register a session with cocoapods
# 4. run `pod trunk push ./`

# see cocoapods documentation http://docs.cocoapods.org/specification.html for
# more details.
Pod::Spec.new do |s|

# ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
s.name = "nlohmann_json"
s.version = "3.9.1"
s.summary = "JSON for Modern C++"


# CocoaPods strips indentation for description
s.description = <<-DESC
JSON library for modern c++, it can read & write JSON. If you know how to
use std::vector or std::map, you are already set.
DESC

s.homepage = "https://github.com/nlohmann/json"
s.screenshots = "https://raw.githubusercontent.com/nlohmann/json/master/doc/json.gif"


license_text = File.read("LICENSE.MIT")
# cocoapods checks extension and expects it to be a txt. so instead
# we read the file and pass it in as text.
s.license = { :type => "MIT", :text => license_text }


s.authors = {
"Niels Lohmann" => "mail@nlohmann.me"
}

s.platform = :ios, "8.0"

# Below is where it is changed for firebase.
s.ios.deployment_target = "8.0"
s.osx.deployment_target = "10.7"
s.tvos.deployment_target = "9.0"
# Firebase change ends here.

s.source = { :git => "https://github.com/nlohmann/json.git", :tag => "v#{s.version}" }

s.source_files = "single_include/**/*.hpp"
s.public_header_files = "single_include/nlohmann/json.hpp"
end
1 change: 1 addition & 0 deletions spm_build.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include <utility>