diff options
| author | Sönke Schau <xgcssch@users.noreply.github.com> | 2021-03-29 18:25:14 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-29 09:25:14 -0700 |
| commit | d4c34fd2715912f667e778a2907792d6e570e7d2 (patch) | |
| tree | 407a57299049507c696d4b62628d04e16c52fd3f | |
| parent | 8a8eb7194187f9e79fcd79601573a8b0c17ebf0d (diff) | |
| download | vcpkg-d4c34fd2715912f667e778a2907792d6e570e7d2.tar.gz vcpkg-d4c34fd2715912f667e778a2907792d6e570e7d2.zip | |
[libcbor] New port (#16884)
* [libcbor] Initial commit
* [libcbor] Add metadata
* Changes made by vcpkg.exe format-manifest --all
* Changes made by vcpkg.exe x-add-version libcbor --overwrite-version
| -rw-r--r-- | ports/libcbor/LibCborConfig.cmake | 13 | ||||
| -rw-r--r-- | ports/libcbor/portfile.cmake | 29 | ||||
| -rw-r--r-- | ports/libcbor/vcpkg.json | 7 | ||||
| -rw-r--r-- | versions/baseline.json | 4 | ||||
| -rw-r--r-- | versions/l-/libcbor.json | 9 |
5 files changed, 62 insertions, 0 deletions
diff --git a/ports/libcbor/LibCborConfig.cmake b/ports/libcbor/LibCborConfig.cmake new file mode 100644 index 000000000..c2fef5086 --- /dev/null +++ b/ports/libcbor/LibCborConfig.cmake @@ -0,0 +1,13 @@ +# Distributed under the OSI-approved BSD 3-Clause License.
+
+find_path(LIBCBOR_INCLUDE_DIR NAMES cbor.h)
+
+find_library(LIBCBOR_LIBRARY cbor)
+
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBCBOR DEFAULT_MSG LIBCBOR_LIBRARY LIBCBOR_INCLUDE_DIR)
+
+if(LIBCBOR_FOUND)
+ set(LIBCBOR_LIBRARIES ${LIBCBOR_LIBRARY})
+endif()
+
+mark_as_advanced(LIBCBOR_INCLUDE_DIR LIBCBOR_LIBRARY)
diff --git a/ports/libcbor/portfile.cmake b/ports/libcbor/portfile.cmake new file mode 100644 index 000000000..252a70868 --- /dev/null +++ b/ports/libcbor/portfile.cmake @@ -0,0 +1,29 @@ +vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO PJK/libcbor
+ REF v0.8.0
+ SHA512 694d2d3a78d80072f96e0afb73590ca1f3572e41d2117330ef4313ed06271743b048d3ba3259c6ffe9a802d5e441379d0e54787d1d42fed08dc81ac4f06c6dbc
+ HEAD_REF master
+)
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ PREFER_NINJA
+ OPTIONS
+ -DWITH_TESTS=OFF
+ -DWITH_EXAMPLES=OFF
+ -DVCPKG_VERBOSE=ON
+ )
+
+vcpkg_build_cmake()
+vcpkg_install_cmake()
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+vcpkg_copy_pdbs()
+vcpkg_fixup_pkgconfig()
+
+# Add Cmake Packagefile
+file(COPY ${CMAKE_CURRENT_LIST_DIR}/LibCborConfig.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
+
+# Handle copyright
+configure_file(${SOURCE_PATH}/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
diff --git a/ports/libcbor/vcpkg.json b/ports/libcbor/vcpkg.json new file mode 100644 index 000000000..3a546ab35 --- /dev/null +++ b/ports/libcbor/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "libcbor", + "version-string": "0.8.0", + "description": "libcbor is a C library for parsing and generating CBOR, the general-purpose schema-less binary data format", + "homepage": "https://github.com/PJK/libcbor", + "supports": "(x86 | x64) & windows" +} diff --git a/versions/baseline.json b/versions/baseline.json index e3aed2d59..f94bcf822 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2932,6 +2932,10 @@ "baseline": "1.16.1", "port-version": 2 }, + "libcbor": { + "baseline": "0.8.0", + "port-version": 0 + }, "libcds": { "baseline": "2.3.3", "port-version": 0 diff --git a/versions/l-/libcbor.json b/versions/l-/libcbor.json new file mode 100644 index 000000000..6e26aa711 --- /dev/null +++ b/versions/l-/libcbor.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "ef3f79d600e1f00656e522591c6ff7beed247e3a", + "version-string": "0.8.0", + "port-version": 0 + } + ] +} |
