Skip to content

Commit 0e3b8af

Browse files
committed
untested download and install rust-utils for windows
1 parent e9d3ea1 commit 0e3b8af

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

CMakeLists.txt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,14 +266,21 @@ if (viam_rust_utils_files)
266266
${viam_rust_utils_file}
267267
ONLY_IF_DIFFERENT
268268
)
269-
elseif(NOT WIN32) # TODO(RSDK-10366): Currently, rust_utils is not published for windows, so don't even try downloading
269+
elseif(NOT WIN32 OR (CMAKE_SYSTEM_PROCESSOR STREQUAL "X86") OR (CMAKE_SYSTEM_PROCESSOR STREQUAL "X64")) # TODO(RSDK-10366): Currently, rust_utils is not published for windows aarch, so don't even try downloading
270270
set(lvru_system_name ${CMAKE_SYSTEM_NAME})
271+
if (CMAKE_SYSTEM_NAME STREQUAL "Cygwin")
272+
set(lvru_system_name "windows")
273+
endif()
271274
if (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
272275
set(lvru_system_name "macosx")
273276
endif()
277+
set(lvru_system_processor ${CMAKE_SYSTEM_PROCESSOR})
278+
if ((CMAKE_SYSTEM_PROCESSOR STREQUAL "X86") OR (CMAKE_SYSTEM_PROCESSOR STREQUAL "X64"))
279+
set(lvru_system_processor "x86_64")
280+
endif()
274281
file(
275282
DOWNLOAD
276-
https://github.com/viamrobotics/rust-utils/releases/latest/download/${CMAKE_SHARED_LIBRARY_PREFIX}viam_rust_utils-${lvru_system_name}_${CMAKE_SYSTEM_PROCESSOR}${CMAKE_STATIC_LIBRARY_SUFFIX}
283+
https://github.com/viamrobotics/rust-utils/releases/latest/download/${CMAKE_SHARED_LIBRARY_PREFIX}viam_rust_utils-${lvru_system_name}_${lvru_system_processor}${CMAKE_STATIC_LIBRARY_SUFFIX}
277284
${viam_rust_utils_file}
278285
STATUS lvru_status
279286
)

0 commit comments

Comments
 (0)