增加下载工具

This commit is contained in:
2025-03-20 18:24:12 +08:00
parent 6bf7db1f4c
commit 6cdf4cbcd6
12 changed files with 131 additions and 9 deletions

View File

@ -38,6 +38,20 @@ if(CMAKE_JS_RESULT EQUAL 0)
)
endif()
# ReleaseVersion
if(CMAKE_JS_RESULT EQUAL 0)
execute_process(
COMMAND node ${CMAKE_SOURCE_DIR}/thirdpart/cmake-js-util.js --release
RESULT_VARIABLE CMAKE_JS_RESULT
OUTPUT_VARIABLE RELEASE_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(CMAKE_JS_RESULT EQUAL 0)
message(STATUS "RELEASE_VERSION: ${RELEASE_VERSION}")
add_compile_definitions(RELEASE_VERSION="${RELEASE_VERSION}")
endif()
endif()
# NAPI
if(CMAKE_JS_RESULT EQUAL 0)
execute_process(