Skip to content

Commit 53ff595

Browse files
[JS] Fix NPM CPACK_GENERATOR (#1842)
## Details: - Disable JS if CPACK_GENERATOR is not NPM. (This will help if ENABLE_JS was set by mistake.) - Add fallback to standard TGZ from NPM CPACK_GENERATOR ## Tickets: - CVS-155719 Signed-off-by: Kirill Suvorov <[email protected]>
1 parent cb9d68b commit 53ff595

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,4 +117,7 @@ endif()
117117
if(WIN32 AND NOT DEFINED CPACK_GENERATOR)
118118
set(CPACK_GENERATOR "ZIP")
119119
endif()
120+
if(CPACK_GENERATOR STREQUAL "NPM")
121+
set(CPACK_GENERATOR "TGZ")
122+
endif()
120123
include(CPack)

cmake/features.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,8 @@ option(ENABLE_SAMPLES "Enable samples build" ON)
99
# Disable building samples for NPM package
1010
if(CPACK_GENERATOR STREQUAL "NPM")
1111
set(ENABLE_SAMPLES OFF)
12+
set(ENABLE_PYTHON OFF)
13+
set(ENABLE_JS ON)
14+
else()
15+
set(ENABLE_JS OFF)
1216
endif()

0 commit comments

Comments
 (0)