forked from openvinotoolkit/openvino
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add cpack config for NPM build #73
Merged
Merged
Changes from 30 commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
55606a7
Add node headers as submodules
vishniakov-nikolai 734e487
Build nodejs bindings using cmake
vishniakov-nikolai e8d4b6b
Remove extra scripts
vishniakov-nikolai 8163bad
Add .npmignore
vishniakov-nikolai 4232b06
Replace submodules by cmake FetchContent
vishniakov-nikolai 752f7ba
Replace path to package in tests
vishniakov-nikolai 1499b75
Add task that exports compiled bindings
vishniakov-nikolai 950a2ec
Fix cmake, update README
vishniakov-nikolai 9e51e35
Revert and adapt download runtime scrips
vishniakov-nikolai 28e0a14
Merge branch 'master' into feature/cmake-build
vishniakov-nikolai 15ec488
Merge branch 'js-wasm-proto' into feature/cmake-build
vishniakov-nikolai 22556ee
Adapt download_binaries script
vishniakov-nikolai da66821
Update download binaries script and package.json info
vishniakov-nikolai 9d4056a
Merge branch 'js-wasm-proto' into feature/cmake-build
vishniakov-nikolai 7dd39ae
Fix instruction
vishniakov-nikolai 97d42e2
Add cpack config for NPM build
vishniakov-nikolai 18fe98d
Extend config
vishniakov-nikolai 99d2570
Added more exclude markers for install rules
ilya-lavrenov eea8bed
Merge branch 'cmake-install-rules' into feature/extend-cpack
vishniakov-nikolai 0ca0fb4
Merge branch 'js-wasm-proto' into feature/extend-cpack
vishniakov-nikolai 69ebfd9
Update package config
vishniakov-nikolai 56e33fb
Merge branch 'js-wasm-proto' into feature/extend-cpack
vishniakov-nikolai 3fcc58e
Combine files for npm binaries archive
vishniakov-nikolai bc1e460
Merge branch 'master' into feature/cmake-build
vishniakov-nikolai 9db7956
Merge branch 'feature/cmake-build' into feature/extend-cpack
vishniakov-nikolai a8a31a5
Merge branch 'js-wasm-proto' into feature/cmake-build
vishniakov-nikolai 4e49a99
Merge branch 'feature/cmake-build' into feature/extend-cpack
vishniakov-nikolai 87a5198
Remove unnecessary commands
vishniakov-nikolai a6c3a3b
Merge branch 'js-wasm-proto' into feature/cmake-build
vishniakov-nikolai b678c19
Merge branch 'feature/cmake-build' into feature/extend-cpack
vishniakov-nikolai 3064e25
Ability to exclude TBB from install package
ilya-lavrenov da69e6b
Merge branch 'tbb' into feature/extend-cpack
vishniakov-nikolai d3219da
Ability to exclude TBB from install package
ilya-lavrenov 2c0071a
Merge branch 'tbb' into feature/extend-cpack
vishniakov-nikolai b02e1f8
Adopt npm package to updated tbb
vishniakov-nikolai b008ffd
Merge branch 'js-wasm-proto' into feature/cmake-build
vishniakov-nikolai df549cc
Merge branch 'feature/cmake-build' into feature/extend-cpack
vishniakov-nikolai 566c42d
Use ov_set_install_rpath to define rpath in nodejs bindings
vishniakov-nikolai b616a62
Remove unnecessary files
vishniakov-nikolai 9485d35
Fix review remarks
vishniakov-nikolai 5cb1673
Specify README build instructions
vishniakov-nikolai 0f53d72
Merge branch 'js-wasm-proto' into feature/extend-cpack
vishniakov-nikolai File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
# Copyright (C) 2018-2023 Intel Corporation | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
|
||
include(GNUInstallDirs) | ||
|
||
# Put all libraries in one dir | ||
set(CMAKE_SKIP_INSTALL_RPATH OFF) | ||
|
||
# | ||
# ov_npm_cpack_set_dirs() | ||
# | ||
# Set directories for cpack | ||
# | ||
macro(ov_npm_cpack_set_dirs) | ||
set(OV_CPACK_INCLUDEDIR runtime/include) | ||
set(OV_CPACK_IE_CMAKEDIR runtime/cmake) | ||
set(OV_CPACK_NGRAPH_CMAKEDIR runtime/cmake) | ||
set(OV_CPACK_OPENVINO_CMAKEDIR runtime/cmake) | ||
set(OV_CPACK_DOCDIR docs) | ||
set(OV_CPACK_LICENSESDIR licenses) | ||
set(OV_CPACK_SAMPLESDIR samples) | ||
set(OV_CPACK_WHEELSDIR tools) | ||
set(OV_CPACK_TOOLSDIR tools) | ||
set(OV_CPACK_DEVREQDIR tools) | ||
set(OV_CPACK_PYTHONDIR python) | ||
|
||
if(WIN32) | ||
set(OV_CPACK_LIBRARYDIR ${ARCH_FOLDER}/${build_type}) | ||
set(OV_CPACK_RUNTIMEDIR ${ARCH_FOLDER}/${build_type}) | ||
set(OV_CPACK_ARCHIVEDIR ${ARCH_FOLDER}/${build_type}) | ||
elseif(APPLE) | ||
set(OV_CPACK_LIBRARYDIR ${ARCH_FOLDER}/${build_type}) | ||
set(OV_CPACK_RUNTIMEDIR ${ARCH_FOLDER}/${build_type}) | ||
set(OV_CPACK_ARCHIVEDIR ${ARCH_FOLDER}/${build_type}) | ||
else() | ||
set(OV_CPACK_LIBRARYDIR ".") | ||
set(OV_CPACK_RUNTIMEDIR ".") | ||
set(OV_CPACK_ARCHIVEDIR ".") | ||
vishniakov-nikolai marked this conversation as resolved.
Show resolved
Hide resolved
|
||
endif() | ||
|
||
set(OV_CPACK_LIBRARYDIR ${OV_CPACK_RUNTIMEDIR}) | ||
set(OV_CPACK_ARCHIVEDIR ${OV_CPACK_RUNTIMEDIR}) | ||
set(OV_CPACK_PLUGINSDIR ${OV_CPACK_RUNTIMEDIR}/openvino-${OpenVINO_VERSION}) | ||
set(OV_CPACK_IE_CMAKEDIR ${OV_CPACK_RUNTIMEDIR}/cmake/inferenceengine${OpenVINO_VERSION}) | ||
set(OV_CPACK_NGRAPH_CMAKEDIR ${OV_CPACK_RUNTIMEDIR}/cmake/ngraph${OpenVINO_VERSION}) | ||
set(OV_CPACK_OPENVINO_CMAKEDIR ${OV_CPACK_RUNTIMEDIR}/cmake/openvino${OpenVINO_VERSION}) | ||
set(OV_CPACK_DOCDIR ${CMAKE_INSTALL_DATADIR}/doc/openvino-${OpenVINO_VERSION}) | ||
set(OV_CPACK_LICENSESDIR licenses) | ||
set(OV_CPACK_PYTHONDIR lib/python3/dist-packages) | ||
|
||
# non-native stuff | ||
set(OV_CPACK_SHAREDIR ${CMAKE_INSTALL_DATADIR}/openvino) # internal | ||
set(OV_CPACK_SAMPLESDIR ${OV_CPACK_SHAREDIR}/samples) | ||
set(OV_CPACK_DEVREQDIR ${OV_CPACK_SHAREDIR}) | ||
unset(OV_CPACK_SHAREDIR) | ||
|
||
# skipped during debian packaging | ||
set(OV_CPACK_WHEELSDIR "tools") | ||
endmacro() | ||
|
||
ov_npm_cpack_set_dirs() | ||
|
||
# | ||
# Override include / exclude rules for components | ||
# This is required to exclude some files from installation | ||
# (e.g. npm package requires only C++ Core component) | ||
# | ||
|
||
macro(ov_define_component_include_rules) | ||
# core components | ||
unset(OV_CPACK_COMP_CORE_EXCLUDE_ALL) | ||
set(OV_CPACK_COMP_CORE_C_EXCLUDE_ALL EXCLUDE_FROM_ALL) | ||
set(OV_CPACK_COMP_CORE_DEV_EXCLUDE_ALL EXCLUDE_FROM_ALL) | ||
set(OV_CPACK_COMP_CORE_C_DEV_EXCLUDE_ALL EXCLUDE_FROM_ALL) | ||
# licensing | ||
unset(OV_CPACK_COMP_LICENSING_EXCLUDE_ALL) | ||
# samples | ||
set(OV_CPACK_COMP_CPP_SAMPLES_EXCLUDE_ALL EXCLUDE_FROM_ALL) | ||
set(OV_CPACK_COMP_C_SAMPLES_EXCLUDE_ALL EXCLUDE_FROM_ALL) | ||
set(OV_CPACK_COMP_PYTHON_SAMPLES_EXCLUDE_ALL EXCLUDE_FROM_ALL) | ||
# python | ||
set(OV_CPACK_COMP_PYTHON_OPENVINO_EXCLUDE_ALL EXCLUDE_FROM_ALL) | ||
set(OV_CPACK_COMP_BENCHMARK_APP_EXCLUDE_ALL EXCLUDE_FROM_ALL) | ||
set(OV_CPACK_COMP_OVC_EXCLUDE_ALL EXCLUDE_FROM_ALL) | ||
set(OV_CPACK_COMP_PYTHON_OPENVINO_PACKAGE_EXCLUDE_ALL EXCLUDE_FROM_ALL) | ||
set(OV_CPACK_COMP_PYTHON_WHEELS_EXCLUDE_ALL EXCLUDE_FROM_ALL) | ||
set(OV_CPACK_COMP_OPENVINO_REQ_FILES_EXCLUDE_ALL EXCLUDE_FROM_ALL) | ||
# nodejs | ||
unset(OV_CPACK_COMP_NPM_EXCLUDE_ALL) | ||
# tools | ||
set(OV_CPACK_COMP_OPENVINO_DEV_REQ_FILES_EXCLUDE_ALL EXCLUDE_FROM_ALL) | ||
set(OV_CPACK_COMP_DEPLOYMENT_MANAGER_EXCLUDE_ALL EXCLUDE_FROM_ALL) | ||
# scripts | ||
set(OV_CPACK_COMP_INSTALL_DEPENDENCIES_EXCLUDE_ALL EXCLUDE_FROM_ALL) | ||
set(OV_CPACK_COMP_SETUPVARS_EXCLUDE_ALL EXCLUDE_FROM_ALL) | ||
endmacro() | ||
|
||
ov_define_component_include_rules() | ||
|
||
# New in version 3.18 | ||
set(CPACK_ARCHIVE_THREADS 8) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Copyright (C) 2018-2023 Intel Corporation | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
|
||
# | ||
# OpenVINO NPM binaries, includes openvino:runtime, frontends, plugins, tbb | ||
# | ||
macro(ov_cpack_settings) | ||
# fill a list of components which are part of conda | ||
set(cpack_components_all ${CPACK_COMPONENTS_ALL}) | ||
|
||
unset(CPACK_COMPONENTS_ALL) | ||
foreach(item IN LISTS cpack_components_all) | ||
string(TOUPPER ${item} UPPER_COMP) | ||
|
||
# filter out some components, which are not needed to be wrapped to npm package | ||
if(NOT OV_CPACK_COMP_${UPPER_COMP}_EXCLUDE_ALL AND | ||
# because in case of VCPKG | CONAN | BREW | CONDA-FORGE distributions, python is either not needed or installed separately | ||
vishniakov-nikolai marked this conversation as resolved.
Show resolved
Hide resolved
|
||
(NOT item MATCHES "^${OV_CPACK_COMP_PYTHON_OPENVINO_PACKAGE}_python.*" OR ENABLE_PYTHON_PACKAGING) AND | ||
# skip all extra components, left only requirement libs, like tbb | ||
NOT item STREQUAL "tbb_dev" | ||
) | ||
list(APPEND CPACK_COMPONENTS_ALL ${item}) | ||
endif() | ||
endforeach() | ||
unset(cpack_components_all) | ||
list(REMOVE_DUPLICATES CPACK_COMPONENTS_ALL) | ||
|
||
# override generator | ||
set(CPACK_GENERATOR "TGZ") | ||
endmacro() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
build | ||
include | ||
lib | ||
src | ||
tests | ||
thirdparty | ||
|
||
.eslintrc.js | ||
CMakeLists.txt | ||
tsconfig.json | ||
|
||
**/*.tsbuildinfo | ||
*.tgz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like the comment is wrong
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment was fixed