Skip to content

Commit

Permalink
AI: Add search for and installation of DirectML.dll
Browse files Browse the repository at this point in the history
  • Loading branch information
codeling committed Apr 4, 2023
1 parent d77d4cd commit db7423e
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions modules/AI/enabled.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,18 @@ endif()

if (openiA_ONNX_NEWNAMEFUNCTIONS)
target_compile_definitions(AI PRIVATE ONNX_NEWNAMEFUNCTIONS)
endif()

find_library(DIRECTML_LIBRARY DirectML
PATHS
${ONNX_RUNTIME_DIR}/lib
${ONNX_RUNTIME_DIR}/runtimes/win-x64/native
)

if (NOT openiA_ONNX_CUDA)
if (${DIRECTML_LIBRARY} STREQUAL "DIRECTML_LIBRARY-NOTFOUND")
message(WARNING "You did not specify a DirectML library to use! If you build a release, the AI segmentation will not work!")
else()
install(FILES ${DIRECTML_LIBRARY} DESTINATION .)
endif()
endif()

0 comments on commit db7423e

Please sign in to comment.