vcpkg/ports/libcbor/portfile.cmake
Sönke Schau d4c34fd271
[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
2021-03-29 09:25:14 -07:00

30 lines
859 B
CMake

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)