Skip to content

Commit

Permalink
fix (real)
Browse files Browse the repository at this point in the history
  • Loading branch information
decahedron1 committed Aug 13, 2024
1 parent 49e3319 commit 6a627d3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
9 changes: 8 additions & 1 deletion src/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,16 @@ await new Command()
// if (platform === 'win32') {
// args.push('-DONNX_USE_MSVC_STATIC_RUNTIME=OFF');
// args.push('-Dprotobuf_MSVC_STATIC_RUNTIME=OFF');
// args.push('-Dgtest_force_shared_crt=OFF');
// args.push('-Dgtest_force_shared_crt=ON');
// }
args.push('-Donnxruntime_BUILD_SHARED_LIB=ON');
} else {
if (platform === 'win32') {
args.push('-DONNX_USE_MSVC_STATIC_RUNTIME=OFF');
args.push('-Dprotobuf_MSVC_STATIC_RUNTIME=OFF');
args.push('-Dgtest_force_shared_crt=ON');
args.push('-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL');
}
}

args.push('-Donnxruntime_BUILD_UNIT_TESTS=OFF');
Expand Down
3 changes: 0 additions & 3 deletions src/static-build/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
cmake_minimum_required(VERSION 3.26)
project(onnxruntime_static_lib)

# set(CMAKE_MSVC_RUNTIME_LIBRARY MultiThreaded)
# set(ONNX_USE_MSVC_STATIC_RUNTIME ON)
set(protobuf_MSVC_STATIC_RUNTIME OFF)
set(onnxruntime_BUILD_SHARED_LIB ON)

add_definitions(-D_SILENCE_ALL_CXX23_DEPRECATION_WARNINGS)
Expand Down

0 comments on commit 6a627d3

Please sign in to comment.