vcpkg/ports/node-addon-api/portfile.cmake
Ali Saki a78464841a
[node-api-headers/node-addon-api] update node-api-headers to 1.1.0, and update node-addon-api to 7.0.0 (#35658)
* [node-api-headers] update to version 1.1.0

* [node-addon-api] update to version 7.0.0

* Update version database
2023-12-15 15:33:44 -08:00

17 lines
887 B
CMake

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO nodejs/node-addon-api
REF "v${VERSION}"
SHA512 ff7b712b53479c10ebf34b6723b91a3e70eb946c39fc7feeebc5485a3928f15ce2af92126d3c331e54fbb852bec8286aa5ddd8211f1315f3b133fcede6e2f53c
HEAD_REF main
)
file(COPY "${SOURCE_PATH}/napi.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include")
file(COPY "${SOURCE_PATH}/napi-inl.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include")
file(COPY "${SOURCE_PATH}/napi-inl.deprecated.h" DESTINATION "${CURRENT_PACKAGES_DIR}/include")
file(COPY "${CMAKE_CURRENT_LIST_DIR}/unofficial-node-addon-api-config.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/unofficial-${PORT}")
file(INSTALL "${SOURCE_PATH}/LICENSE.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")