diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/qcbor | |
Diffstat (limited to 'vcpkg/ports/qcbor')
| -rw-r--r-- | vcpkg/ports/qcbor/install.patch | 28 | ||||
| -rw-r--r-- | vcpkg/ports/qcbor/portfile.cmake | 28 | ||||
| -rw-r--r-- | vcpkg/ports/qcbor/vcpkg.json | 17 |
3 files changed, 73 insertions, 0 deletions
diff --git a/vcpkg/ports/qcbor/install.patch b/vcpkg/ports/qcbor/install.patch new file mode 100644 index 0000000..fbe27e4 --- /dev/null +++ b/vcpkg/ports/qcbor/install.patch @@ -0,0 +1,28 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 3537c27..bf569a5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -46,7 +46,8 @@ target_sources(qcbor + + target_include_directories(qcbor + PUBLIC +- inc ++ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/inc> ++ $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/qcbor> + PRIVATE + src + ) +@@ -90,8 +91,13 @@ set_target_properties( + include(GNUInstallDirs) + install( + TARGETS qcbor ++ EXPORT unofficial-qcbor-targets + PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/qcbor" + ) ++install(EXPORT unofficial-qcbor-targets ++ FILE unofficial-qcbor-config.cmake ++ NAMESPACE unofficial::qcbor:: ++ DESTINATION share/unofficial-qcbor) + + if (NOT BUILD_QCBOR_TEST STREQUAL "OFF") + enable_testing() diff --git a/vcpkg/ports/qcbor/portfile.cmake b/vcpkg/ports/qcbor/portfile.cmake new file mode 100644 index 0000000..1d93e77 --- /dev/null +++ b/vcpkg/ports/qcbor/portfile.cmake @@ -0,0 +1,28 @@ +# No DLL export(yet) +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO laurencelundblade/QCBOR + REF v${VERSION} + SHA512 3961cbcde2dde3565b68f92b53e92db31b649b71bc683a8439bada3aa6c44f4727747ca7b4ad35c4ca6f5bd0594abc2bf36a6ce0c7452eb412e8dcd55e946585 + HEAD_REF master + PATCHES + install.patch +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DBUILD_QCBOR_TEST=OFF +) + +vcpkg_cmake_install() + +file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/debug/share" +) +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/vcpkg/ports/qcbor/vcpkg.json b/vcpkg/ports/qcbor/vcpkg.json new file mode 100644 index 0000000..a7e1cb7 --- /dev/null +++ b/vcpkg/ports/qcbor/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "qcbor", + "version": "1.5.3", + "description": "Comprehensive, powerful, commercial-quality CBOR encoder/ decoder that is still suited for small devices.", + "homepage": "https://github.com/laurencelundblade/QCBOR", + "license": "BSD-3-Clause", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} |