@@ -37,13 +37,6 @@ if (WIN32)
3737 # Use a newer version of CMake on Windows, so we are NEW for
3838 # https://cmake.org/cmake/help/latest/policy/CMP0149.html
3939 cmake_minimum_required (VERSION 3.27 FATAL_ERROR)
40-
41- # rust-utils always has a `lib` prefix
42- set (CMAKE_SHARED_LIBRARY_PREFIX "lib" )
43- message (WARNING "it should be lib is it? ${CMAKE_SHARED_LIBRARY_PREFIX} " )
44-
45- # set boost compiler to avoid errors with boost log
46- set (Boost_COMPILER "vc143" )
4740else ()
4841 cmake_minimum_required (VERSION 3.25 FATAL_ERROR)
4942endif ()
@@ -259,14 +252,9 @@ find_package(Threads REQUIRED)
259252# TODO: When this is removed, also remove the
260253# `target_link_directories` call down in src/CMakeLists.txt, as it
261254# will no longer be needed.
262- set (viam_rust_utils_file ${CMAKE_CURRENT_BINARY_DIR} /${CMAKE_STATIC_LIBRARY_PREFIX} viam_rust_utils${CMAKE_STATIC_LIBRARY_SUFFIX} )
263-
264- file (GLOB viam_rust_utils_files ${PROJECT_SOURCE_DIR} /${CMAKE_STATIC_LIBRARY_PREFIX} viam_rust_utils*${CMAKE_STATIC_LIBRARY_SUFFIX} )
255+ set (viam_rust_utils_file ${CMAKE_CURRENT_BINARY_DIR} /${CMAKE_SHARED_LIBRARY_PREFIX} viam_rust_utils${CMAKE_STATIC_LIBRARY_SUFFIX} )
265256
266- # Check if the architecture is one that we support in rust-utils
267- set (WINDOWS_ARCHS "AMD64" "X86" "X64" )
268- list (FIND WINDOWS_ARCHS CMAKE_SYSTEM_PROCESSOR idx)
269- set (rust_utils_supported_windows_arch (idx GREATER -1))
257+ file (GLOB viam_rust_utils_files ${PROJECT_SOURCE_DIR} /${CMAKE_SHARED_LIBRARY_PREFIX} viam_rust_utils*${CMAKE_STATIC_LIBRARY_SUFFIX} )
270258
271259if (viam_rust_utils_files)
272260 list (LENGTH viam_rust_utils_files num_viam_rust_utils_files)
@@ -278,15 +266,15 @@ if (viam_rust_utils_files)
278266 ${viam_rust_utils_file}
279267 ONLY_IF_DIFFERENT
280268 )
281- elseif (NOT WIN32 ) # TODO(RSDK-10366 ): Currently, rust_utils windows builds aren't working in CI, so don't even try downloading
269+ elseif (NOT WIN32 ) # TODO(RSDK-10637 ): Currently, rust_utils windows builds aren't working in CI, so don't even try downloading
282270 set (lvru_system_name ${CMAKE_SYSTEM_NAME} )
283271 if (CMAKE_SYSTEM_NAME STREQUAL "Darwin" )
284272 set (lvru_system_name "macosx" )
285273 endif ()
286274
287275 file (
288276 DOWNLOAD
289- https://github.com/viamrobotics/rust-utils/releases/latest/download/${CMAKE_STATIC_LIBRARY_PREFIX } viam_rust_utils-${lvru_system_name} _${CMAKE_SYSTEM_PROCESSOR}${CMAKE_STATIC_LIBRARY_SUFFIX}
277+ 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}
290278 ${viam_rust_utils_file}
291279 STATUS lvru_status
292280 )
@@ -297,7 +285,7 @@ elseif(NOT WIN32) # TODO(RSDK-10366): Currently, rust_utils windows builds aren'
297285 message (FATAL_ERROR "No local viam_rust_utils found and failed to download: ${lvru_status_string} " )
298286 endif ()
299287else ()
300- message (WARNING "Currently running on Windows with no rust-utils file. Module code should work as expected, but client code may fail unexpectedly." )
288+ message (WARNING "Currently running on Windows with no rust-utils file. Module code should work as expected, but client code may fail unexpectedly." )
301289endif ()
302290
303291# TODO(RSDK-10366): Currently, rust_utils is not published for windows, so don't even declare the library
0 commit comments