@@ -82,7 +82,11 @@ def package(self):
8282 CMake (self ).install ()
8383
8484 def package_info (self ):
85- self .cpp_info .components ["viam_rust_utils" ].libs = ["viam_rust_utils" ]
85+
86+ # TODO(RSDK-10366): Currently, rust_utils is not published for windows
87+ # and the C++ SDK just doesn't include it as a dependency on that platform
88+ if not self .settings .os == "Windows" :
89+ self .cpp_info .components ["viam_rust_utils" ].libs = ["viam_rust_utils" ]
8690
8791 self .cpp_info .components ["viamsdk" ].libs = ["viamsdk" ]
8892
@@ -103,10 +107,16 @@ def package_info(self):
103107 else :
104108 lib_folder = os .path .join (self .package_folder , "lib" )
105109 lib_fullpath = os .path .join (lib_folder , "libviamapi.a" )
110+ if self .settings .os == "Windows" :
111+ lib_fullpath = os .path .join (lib_folder , "viamapi.lib" )
112+
106113 if is_apple_os (self ):
107114 whole_archive = f"-Wl,-force_load,{ lib_fullpath } "
115+ elif self .settings .os == "Windows" :
116+ whole_archive = f"/WHOLEARCHIVE:{ lib_fullpath } "
108117 else :
109118 whole_archive = f"-Wl,--push-state,--whole-archive,{ lib_fullpath } ,--pop-state"
119+
110120 self .cpp_info .components ["viamapi" ].exelinkflags .append (whole_archive )
111121 self .cpp_info .components ["viamapi" ].sharedlinkflags .append (whole_archive )
112122
@@ -118,7 +128,13 @@ def package_info(self):
118128 "xtensor::xtensor" ,
119129
120130 "viamapi" ,
121- "viam_rust_utils"
122131 ])
123132
133+ # TODO(RSDK-10366): Currently, rust_utils is not published for windows
134+ # and the C++ SDK just doesn't include it as a dependency on that platform
135+ if self .settings .os != "Windows" :
136+ self .cpp_info .components ["viamsdk" ].requires .extend ([
137+ "viam_rust_utils"
138+ ])
139+
124140 self .cpp_info .components ["viamsdk" ].frameworks = ["Security" ]
0 commit comments