diff options
| author | Alexander Karatarakis <alex@karatarakis.com> | 2017-03-14 18:29:19 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-03-14 18:29:19 -0700 |
| commit | 3e5a32db9bce1a6f3b296adbf51f1945af6b0ffc (patch) | |
| tree | fdca6bb39e7d7b423b1e49a1fc046253e628c22e | |
| parent | abf0d7015ab42f559a0233d392a64813e2808910 (diff) | |
| parent | ac63b3651c0b3854bb8f5bacdffaecdf72737356 (diff) | |
| download | vcpkg-3e5a32db9bce1a6f3b296adbf51f1945af6b0ffc.tar.gz vcpkg-3e5a32db9bce1a6f3b296adbf51f1945af6b0ffc.zip | |
Merge pull request #796 from Drako/nlohmann-json
Added nlohmann-json port
| -rw-r--r-- | ports/nlohmann-json/CONTROL | 3 | ||||
| -rw-r--r-- | ports/nlohmann-json/portfile.cmake | 22 |
2 files changed, 25 insertions, 0 deletions
diff --git a/ports/nlohmann-json/CONTROL b/ports/nlohmann-json/CONTROL new file mode 100644 index 000000000..4e65a9d93 --- /dev/null +++ b/ports/nlohmann-json/CONTROL @@ -0,0 +1,3 @@ +Source: nlohmann-json +Version: 2.1.1 +Description: JSON for Modern C++ diff --git a/ports/nlohmann-json/portfile.cmake b/ports/nlohmann-json/portfile.cmake new file mode 100644 index 000000000..8a8f5dc30 --- /dev/null +++ b/ports/nlohmann-json/portfile.cmake @@ -0,0 +1,22 @@ +include(vcpkg_common_functions) +set(SOURCE_VERSION 2.1.1) +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/json-${SOURCE_VERSION}) +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/nlohmann/json/archive/v${SOURCE_VERSION}.zip" + FILENAME "nlohmann-json-v${SOURCE_VERSION}.zip" + SHA512 7f7155c4bcc4f704f329ba6976c31888a45d17bc2fa08ee9e64dc1b0b1f39439819b895cda9d77f3f60446ad6f5802e9c6ae79fbaf6d1b6f7e49ca050b86cd7c +) +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH} + PREFER_NINJA +) + +vcpkg_install_cmake() + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/cmake) +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug) + +file(COPY ${SOURCE_PATH}/LICENSE.MIT DESTINATION ${CURRENT_PACKAGES_DIR}/share/nlohmann-json) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/nlohmann-json/LICENSE.MIT ${CURRENT_PACKAGES_DIR}/share/nlohmann-json/copyright) |
