Commit 9748995 1 parent 68e11bb commit 9748995 Copy full SHA for 9748995
File tree 1 file changed +11
-2
lines changed
whisper_onnxruntime_vendor
1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 1
1
cmake_minimum_required (VERSION 3.8)
2
2
project (whisper_onnxruntime_vendor)
3
3
4
+ # Determine the architecture
5
+ if (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" )
6
+ set (ARCHITECTURE "x64" )
7
+ elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64" )
8
+ set (ARCHITECTURE "aarch64" )
9
+ else ()
10
+ message (FATAL_ERROR "Unsupported architecture: ${CMAKE_SYSTEM_PROCESSOR} " )
11
+ endif ()
12
+
4
13
# Set variables for the package
5
14
set (ONNXRUNTIME_VERSION "1.18.1" ) # Specify the desired ONNX Runtime version
6
- set (ONNXRUNTIME_URL "https://github.com/microsoft/onnxruntime/releases/download/v${ONNXRUNTIME_VERSION} /onnxruntime-linux-x64 -${ONNXRUNTIME_VERSION} .tgz" )
15
+ set (ONNXRUNTIME_URL "https://github.com/microsoft/onnxruntime/releases/download/v${ONNXRUNTIME_VERSION} /onnxruntime-linux-${ARCHITECTURE} -${ONNXRUNTIME_VERSION} .tgz" )
7
16
8
17
# ROS 2 package configuration
9
18
find_package (ament_cmake REQUIRED)
10
19
11
20
# Define a vendor package installation directory
12
- set (ONNXRUNTIME_INSTALL_DIR "${CMAKE_BINARY_DIR} /onnxruntime-linux-x64 -${ONNXRUNTIME_VERSION} " )
21
+ set (ONNXRUNTIME_INSTALL_DIR "${CMAKE_BINARY_DIR} /onnxruntime-linux-${ARCHITECTURE} -${ONNXRUNTIME_VERSION} " )
13
22
14
23
# Add a custom target to download and extract the prebuilt ONNX Runtime
15
24
find_program (CURL_EXECUTABLE curl REQUIRED)
You can’t perform that action at this time.
0 commit comments