vcpkg/ports/node-addon-api/portfile.cmake

17 lines
887 B
CMake
Raw Normal View History

[node-addon-api] Add new port (#28427) * port is building for x64-windows * Add file endings * Reformat manifest file * Add versions * Remove comment * Check host system instead of target * fix user fs pollution & allow nodejs tool to have the same triplet as target has * x86-windows now builds * Support find_package (TARGET_SOURCES still todo) * add win_delay_hook.cc * license for nodejs * reformat * reformat * Update node-api.json * nodejs port ver increment * fix versions * fix versions * Fix find_library/find_path review comments * node-api-config.cmake => unofficial-node-api-config.cmake * remove vcpkg_execute_npm_command.cmake * update git-tree in node-api.json * fix node triplet * remove obvious comment * Update node-api.json * Revert everything related to vcpkg-tool-nodejs * fix port-version of vcpkg-tool-nodejs in baseline.json * Update node-api.json * ban arm * fix EOF * Update node-api.json * Tweaks for Linux failure debugging * Update node-api.json * Reformat with vscode cmake formatter * Even more debug logging * add <node_root>/bin to search * Update node-api.json * Add debugging for 2-nd error encountered * update ver * update * update ver * add nodejs tool to path * update ver * use prefix npm option * add version * move things to node tool dir (temporary) * add ver * Add CMAKE_JS_LIB emptyness check * add version * separate node root ad node bin directories * update node-api-config.cmake * add ver * typo-fi * update version * remove debug logging * update ver * do not use system cmake * add ver * rename vars * Update ver * Add comment * add-version * Now downloads cmake-js from github, but deps aren't downloaded (wip) * add version * Seems to work except lodash (wip) * add version * license null (wip) * license null -reformat- (wip) * add ver * Add todo (wip) * add ver * install lodash, new error now related to yargs isn't being built (wip) * add version (wip) * fix (wip) * add version (wip) * Cleanup, will try one thing (wip) * no cmake-js ver, now install includes (wip) * ⌛ closing temporary, I'll get back to this later ⌛. at least I know what to do * test * baseline * format * fill with zeros * update supports * correct url for win * addver * better handle arch and os * ver * update * update * add-todo * add win support * ver * qol * ver * add-sha * ver * update * update * fix-license * fix-license * add sha * add sha * linux-arm64 * linux-arm64 * sha512 for arm * sha512 for arm * remove imported sources * remove imported sources * apply suggestion * add ver * fix eof * add ver * [node-addon-api] Add new port * add version * add newline * add version * Update ports/node-addon-api/vcpkg.json Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> * Update ports/node-addon-api/portfile.cmake Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> * Update ports/node-addon-api/portfile.cmake Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> * Update ports/node-addon-api/portfile.cmake Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> * Update ports/node-addon-api/portfile.cmake Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> * Update node-addon-api.json * Update portfile.cmake * Update node-addon-api.json * Update unofficial-node-addon-api-config.cmake * Update node-addon-api.json * fix dg0yt's comments 1/ * fix 2/ * fix 3/3 * update version * Add usage. --------- Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> Co-authored-by: MonicaLiu <v-liumonica@microsoft.com> Co-authored-by: Jonliu1993 <13720414433@163.com> Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
2023-02-01 10:51:05 +08:00
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO nodejs/node-addon-api
REF "v${VERSION}"
SHA512 ff7b712b53479c10ebf34b6723b91a3e70eb946c39fc7feeebc5485a3928f15ce2af92126d3c331e54fbb852bec8286aa5ddd8211f1315f3b133fcede6e2f53c
[node-addon-api] Add new port (#28427) * port is building for x64-windows * Add file endings * Reformat manifest file * Add versions * Remove comment * Check host system instead of target * fix user fs pollution & allow nodejs tool to have the same triplet as target has * x86-windows now builds * Support find_package (TARGET_SOURCES still todo) * add win_delay_hook.cc * license for nodejs * reformat * reformat * Update node-api.json * nodejs port ver increment * fix versions * fix versions * Fix find_library/find_path review comments * node-api-config.cmake => unofficial-node-api-config.cmake * remove vcpkg_execute_npm_command.cmake * update git-tree in node-api.json * fix node triplet * remove obvious comment * Update node-api.json * Revert everything related to vcpkg-tool-nodejs * fix port-version of vcpkg-tool-nodejs in baseline.json * Update node-api.json * ban arm * fix EOF * Update node-api.json * Tweaks for Linux failure debugging * Update node-api.json * Reformat with vscode cmake formatter * Even more debug logging * add <node_root>/bin to search * Update node-api.json * Add debugging for 2-nd error encountered * update ver * update * update ver * add nodejs tool to path * update ver * use prefix npm option * add version * move things to node tool dir (temporary) * add ver * Add CMAKE_JS_LIB emptyness check * add version * separate node root ad node bin directories * update node-api-config.cmake * add ver * typo-fi * update version * remove debug logging * update ver * do not use system cmake * add ver * rename vars * Update ver * Add comment * add-version * Now downloads cmake-js from github, but deps aren't downloaded (wip) * add version * Seems to work except lodash (wip) * add version * license null (wip) * license null -reformat- (wip) * add ver * Add todo (wip) * add ver * install lodash, new error now related to yargs isn't being built (wip) * add version (wip) * fix (wip) * add version (wip) * Cleanup, will try one thing (wip) * no cmake-js ver, now install includes (wip) * ⌛ closing temporary, I'll get back to this later ⌛. at least I know what to do * test * baseline * format * fill with zeros * update supports * correct url for win * addver * better handle arch and os * ver * update * update * add-todo * add win support * ver * qol * ver * add-sha * ver * update * update * fix-license * fix-license * add sha * add sha * linux-arm64 * linux-arm64 * sha512 for arm * sha512 for arm * remove imported sources * remove imported sources * apply suggestion * add ver * fix eof * add ver * [node-addon-api] Add new port * add version * add newline * add version * Update ports/node-addon-api/vcpkg.json Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> * Update ports/node-addon-api/portfile.cmake Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> * Update ports/node-addon-api/portfile.cmake Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> * Update ports/node-addon-api/portfile.cmake Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> * Update ports/node-addon-api/portfile.cmake Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> * Update node-addon-api.json * Update portfile.cmake * Update node-addon-api.json * Update unofficial-node-addon-api-config.cmake * Update node-addon-api.json * fix dg0yt's comments 1/ * fix 2/ * fix 3/3 * update version * Add usage. --------- Co-authored-by: JonLiu1993 <63675417+JonLiu1993@users.noreply.github.com> Co-authored-by: MonicaLiu <v-liumonica@microsoft.com> Co-authored-by: Jonliu1993 <13720414433@163.com> Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
2023-02-01 10:51:05 +08:00
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}")