vcpkg/ports/node-addon-api/portfile.cmake
Leonid Pospelov baa9d834e7
[node-api|node-addon-api] fix and update (#29599)
* node-api-config-fix

* port-ver

* upd

* hash

* newver

* add-ver

* .

* .

* respect vcpkg_build_type in config

* addver

* Update node-addon-api.json
2023-02-14 10:27:11 -08:00

17 lines
887 B
CMake

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO nodejs/node-addon-api
REF "v${VERSION}"
SHA512 f7889d676665f053577c4964b56a51d628f2da1bd9ee77b478b088cc11750952037687242e0a24036daae759d27c9b619b9f9db9c2c2839204d91af1603a1d90
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}")