Skip to content

Commit f1ba0d3

Browse files
committed
try keeping shared for unix
1 parent ba316a3 commit f1ba0d3

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
@@ -290,12 +290,19 @@ endif()
290290

291291
# TODO(RSDK-10637): Currently, rust_utils doesn't build correctly for windows in CI, so don't declare the library unless a user has provided their own build
292292
if (NOT WIN32 OR num_viam_rust_utils_files GREATER 0)
293-
add_library(viam_rust_utils STATIC IMPORTED)
294-
293+
if (WIN32)
294+
add_library(viam_rust_utils STATIC IMPORTED)
295295
target_link_directories(viam_rust_utils
296296
INTERFACE
297297
"$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>"
298298
)
299+
else()
300+
add_library(viam_rust_utils SHARED IMPORTED)
301+
target_link_directories(viam_rust_utils
302+
INTERFACE
303+
"$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>"
304+
)
305+
endif()
299306

300307
set_property(TARGET viam_rust_utils PROPERTY IMPORTED_LOCATION ${viam_rust_utils_file})
301308
endif()

0 commit comments

Comments
 (0)