Skip to content

Commit d6982be

Browse files
committed
get correct arch
1 parent 15abea3 commit d6982be

File tree

3 files changed

+5
-18
lines changed

3 files changed

+5
-18
lines changed

.github/workflows/conan.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ jobs:
8383
8484
- name: Create package
8585
shell: powershell
86-
#conan create . --build=missing -s compiler.cppstd=17 -c:h tools.microsoft.winsdk_version=10.0.17763.0
8786
run: |
8887
Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1
8988
refreshenv

.github/workflows/release.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -102,16 +102,6 @@ jobs:
102102
ls
103103
ls build/
104104
105-
#- name: Build
106-
#run: |
107-
#mkdir build
108-
#cmake -S . -B build -G Ninja
109-
#cmake --build build --target all install -- -v
110-
#env:
111-
#BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }}
112-
#BOOST_INCLUDEDIR: ${{ steps.install-boost.outputs.BOOST_ROOT }}/include
113-
#BOOST_LIBRARYDIR: ${{ steps.install-boost.outputs.BOOST_ROOT }}/lib
114-
115105
- name: Copy
116106
run: |
117107
cmake --install build --prefix builds/viam-cpp-sdk-${{ matrix.platform }}

CMakeLists.txt

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -258,13 +258,11 @@ find_package(Threads REQUIRED)
258258
set(viam_rust_utils_file ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}viam_rust_utils${CMAKE_STATIC_LIBRARY_SUFFIX})
259259

260260
file(GLOB viam_rust_utils_files ${PROJECT_SOURCE_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}viam_rust_utils*${CMAKE_STATIC_LIBRARY_SUFFIX})
261-
if (NOT WIN32)
262-
message(WARNING "we are not WIN32")
263-
endif()
264261

265-
if (CMAKE_SYSTEM_PROCESSOR STREQUAL "X86" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "X64")
266-
message(WARNING "We are x86 or x64")
267-
endif()
262+
# Check if the architecture is one that we support in rust-utils
263+
set(WINDOWS_ARCHS "AMD64" "X86" "X64")
264+
list(FIND WINDOWS_ARCHS CMAKE_SYSTEM_PROCESSOR idx)
265+
set(rust_utils_supported_windows_arch (idx GREATER -1))
268266

269267
if (viam_rust_utils_files)
270268
list(LENGTH viam_rust_utils_files num_viam_rust_utils_files)
@@ -276,7 +274,7 @@ if (viam_rust_utils_files)
276274
${viam_rust_utils_file}
277275
ONLY_IF_DIFFERENT
278276
)
279-
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
277+
elseif(NOT WIN32 OR rust_utils_supported_windows_arch) # TODO(RSDK-10366): Currently, rust_utils is not published for windows aarch, so don't even try downloading
280278
set(lvru_system_name ${CMAKE_SYSTEM_NAME})
281279
if (CMAKE_SYSTEM_NAME STREQUAL "Cygwin")
282280
set(lvru_system_name "windows")

0 commit comments

Comments
 (0)