Skip to content

Commit

Permalink
Correct cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
hans00 authored Aug 26, 2024
1 parent 7d79d7a commit 365b05d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion js/node/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,17 @@ if(MSVC AND CMAKE_JS_NODELIB_DEF AND CMAKE_JS_NODELIB_TARGET)
execute_process(COMMAND ${CMAKE_AR} /def:${CMAKE_JS_NODELIB_DEF} /out:${CMAKE_JS_NODELIB_TARGET} ${CMAKE_STATIC_LINKER_FLAGS})
endif()

if (WIN32)
if (${ONNXRUNTIME_GENERATOR} MATCHES "Ninja")
set(ONNXRUNTIME_WIN_BIN_DIR ${ONNXRUNTIME_BUILD_DIR})
else()
set(ONNXRUNTIME_WIN_BIN_DIR ${ONNXRUNTIME_BUILD_DIR}/${CMAKE_BUILD_TYPE})
endif()
message(STATUS "onnxruntime dist dir: ${ONNXRUNTIME_WIN_BIN_DIR}")
endif()
# add libraries
if (WIN32)
target_link_directories(onnxruntime_binding PRIVATE ${ONNXRUNTIME_BUILD_DIR}/${CMAKE_BUILD_TYPE})
target_link_directories(onnxruntime_binding PRIVATE ${ONNXRUNTIME_WIN_BIN_DIR})
else()
target_link_directories(onnxruntime_binding PRIVATE ${ONNXRUNTIME_BUILD_DIR})
endif()
Expand Down

0 comments on commit 365b05d

Please sign in to comment.