Skip to content

Commit

Permalink
RSDK-4760 consume .a from rust-utils (#146)
Browse files Browse the repository at this point in the history
  • Loading branch information
abe-winter authored Sep 13, 2023
1 parent 0a10307 commit 1c9261d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@ jobs:
if [ -n "$GEN_DIFF" ]; then
echo 'linting resulted in changes not in git' 1>&2
git status
git diff
exit 1
fi
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -224,10 +224,10 @@ find_package(Threads REQUIRED)
#
# TODO: When this is removed, also remove the
# `target_link_directories` call down in src/CMakeLists.txt, as it
# will no longer be neede.
set(viam_rust_utils_file ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}viam_rust_utils${CMAKE_SHARED_LIBRARY_SUFFIX})
# will no longer be needed.
set(viam_rust_utils_file ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}viam_rust_utils${CMAKE_STATIC_LIBRARY_SUFFIX})

file(GLOB viam_rust_utils_files ${PROJECT_SOURCE_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}viam_rust_utils*${CMAKE_SHARED_LIBRARY_SUFFIX})
file(GLOB viam_rust_utils_files ${PROJECT_SOURCE_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}viam_rust_utils*${CMAKE_STATIC_LIBRARY_SUFFIX})

if (viam_rust_utils_files)
list(LENGTH viam_rust_utils_files num_viam_rust_utils_files)
Expand All @@ -246,7 +246,7 @@ else()
endif()
file(
DOWNLOAD
https://github.com/viamrobotics/rust-utils/releases/latest/download/${CMAKE_SHARED_LIBRARY_PREFIX}viam_rust_utils-${lvru_system_name}_${CMAKE_SYSTEM_PROCESSOR}${CMAKE_SHARED_LIBRARY_SUFFIX}
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}
${viam_rust_utils_file}
STATUS lvru_status
)
Expand Down
1 change: 1 addition & 0 deletions src/viam/examples/modules/simple/main.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include <iostream>
#include <memory>
#include <signal.h>
#include <sstream>

#include <boost/log/trivial.hpp>
#include <grpcpp/grpcpp.h>
Expand Down
5 changes: 5 additions & 0 deletions src/viam/sdk/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,11 @@ target_link_libraries(viamsdk
)


if (APPLE)
target_link_libraries(viamsdk PUBLIC "-framework Security")
endif()


install(
TARGETS viamsdk
EXPORT viamsdk
Expand Down

0 comments on commit 1c9261d

Please sign in to comment.