diff options
| author | Nicolai Grodzitski <utromvecherom@gmail.com> | 2018-05-18 21:03:15 +0300 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2018-05-18 11:03:15 -0700 |
| commit | aad8cbb041ff9d306273ff136f5b3ecd2821b929 (patch) | |
| tree | 4fc5cda155852571e4fb7620a14bf8a2e2cdfdf0 | |
| parent | a90d78293b21f27ab184a35fb61d3f3732764b36 (diff) | |
| download | vcpkg-aad8cbb041ff9d306273ff136f5b3ecd2821b929.tar.gz vcpkg-aad8cbb041ff9d306273ff136f5b3ecd2821b929.zip | |
Add json_dto library. (#3467)
* Prepare port for json_dto.
* Add new line at the end of file.
* Add json-dto to vcpkg.
| -rw-r--r-- | ports/json-dto/CONTROL | 4 | ||||
| -rw-r--r-- | ports/json-dto/portfile.cmake | 33 |
2 files changed, 37 insertions, 0 deletions
diff --git a/ports/json-dto/CONTROL b/ports/json-dto/CONTROL new file mode 100644 index 000000000..2f8c57b00 --- /dev/null +++ b/ports/json-dto/CONTROL @@ -0,0 +1,4 @@ +Source: json-dto +Version: 0.2.5 +Description: A small header-only library for converting data between json representation and c++ structs. +Build-Depends: rapidjson diff --git a/ports/json-dto/portfile.cmake b/ports/json-dto/portfile.cmake new file mode 100644 index 000000000..037ce7f96 --- /dev/null +++ b/ports/json-dto/portfile.cmake @@ -0,0 +1,33 @@ +include(vcpkg_common_functions) + +set(JSON_DTO_VERSION 0.2.5) + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/json_dto-${JSON_DTO_VERSION}-vcpkg) + +vcpkg_download_distfile(ARCHIVE + URLS "https://bitbucket.org/sobjectizerteam/json_dto-0.2/downloads/json_dto-${JSON_DTO_VERSION}-vcpkg.zip" + FILENAME "json_dto-${JSON_DTO_VERSION}-vcpkg.zip" + SHA512 cc21f2abc2799cb9f1c95ae3ae3512869e33d7d0b79c3e05e71d6f0a4376dcf948d89a4d71fe4266efa9d84c19c8a4b8ca2bc8d3d8c217df9ba4e6b87e50c33e +) + +vcpkg_extract_source_archive(${ARCHIVE}) + +vcpkg_configure_cmake( + SOURCE_PATH ${SOURCE_PATH}/dev + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS + -DJSON_DTO_INSTALL=ON + -DJSON_DTO_TEST=OFF + -DJSON_DTO_SAMPLE=OFF + -DJSON_DTO_INSTALL_SAMPLES=OFF +) + +vcpkg_install_cmake() + +vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/json-dto") + +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib ${CURRENT_PACKAGES_DIR}/debug) + +# Handle copyright +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/json-dto) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/json-dto/LICENSE ${CURRENT_PACKAGES_DIR}/share/json-dto/copyright) |
