From 39814319b2d3051d7cf1bf7bcde6f71c296ad90c Mon Sep 17 00:00:00 2001 From: Yulong Wang Date: Thu, 14 May 2020 12:37:32 -0700 Subject: [PATCH] [Node.js binding] fix linux build (#3927) --- nodejs/CMakeLists.txt | 1 + nodejs/src/session_options_helper.cc | 1 + 2 files changed, 2 insertions(+) diff --git a/nodejs/CMakeLists.txt b/nodejs/CMakeLists.txt index ede8dcf4df..d8a3eb72e2 100644 --- a/nodejs/CMakeLists.txt +++ b/nodejs/CMakeLists.txt @@ -13,6 +13,7 @@ execute_process(COMMAND node -e "console.log(process.arch)" execute_process(COMMAND node -e "console.log(process.platform)" OUTPUT_VARIABLE node_platform OUTPUT_STRIP_TRAILING_WHITESPACE) file(READ ${CMAKE_SOURCE_DIR}/../VERSION_NUMBER ort_version) +string(STRIP "${ort_version}" ort_version) set(dist_folder "${CMAKE_SOURCE_DIR}/bin/napi-v3/${node_platform}/${node_arch}/") include_directories(${CMAKE_JS_INC}) diff --git a/nodejs/src/session_options_helper.cc b/nodejs/src/session_options_helper.cc index 8290ebf3dd..55825a4a2b 100644 --- a/nodejs/src/session_options_helper.cc +++ b/nodejs/src/session_options_helper.cc @@ -4,6 +4,7 @@ #include "onnxruntime_cxx_api.h" #include +#include #include #include "common.h"