File tree Expand file tree Collapse file tree 4 files changed +18
-0
lines changed Expand file tree Collapse file tree 4 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -249,6 +249,14 @@ impl CmakeBuilder {
249
249
cmake_cfg. define ( "CMAKE_SYSTEM_NAME" , "Darwin" ) ;
250
250
cmake_cfg. define ( "CMAKE_OSX_SYSROOT" , "macosx" ) ;
251
251
}
252
+ if target_os ( ) . trim ( ) == "tvos" {
253
+ cmake_cfg. define ( "CMAKE_SYSTEM_NAME" , "tvOS" ) ;
254
+ if effective_target ( ) . ends_with ( "-tvos-sim" ) || target_arch ( ) == "x86_64" {
255
+ cmake_cfg. define ( "CMAKE_OSX_SYSROOT" , "appletvsimulator" ) ;
256
+ } else {
257
+ cmake_cfg. define ( "CMAKE_OSX_SYSROOT" , "appletvos" ) ;
258
+ }
259
+ }
252
260
}
253
261
254
262
if target_os ( ) == "windows" {
Original file line number Diff line number Diff line change @@ -744,6 +744,7 @@ fn invoke_external_bindgen(
744
744
if let Some ( prefix_str) = & options. build_prefix {
745
745
sym_prefix = if target_os ( ) . to_lowercase ( ) == "macos"
746
746
|| target_os ( ) . to_lowercase ( ) == "ios"
747
+ || target_os ( ) . to_lowercase ( ) == "tvos"
747
748
|| ( target_os ( ) . to_lowercase ( ) == "windows" && target_arch ( ) == "x86" )
748
749
{
749
750
format ! ( "_{prefix_str}_" )
Original file line number Diff line number Diff line change @@ -200,6 +200,14 @@ impl CmakeBuilder {
200
200
cmake_cfg. define ( "CMAKE_SYSTEM_NAME" , "Darwin" ) ;
201
201
cmake_cfg. define ( "CMAKE_OSX_SYSROOT" , "macosx" ) ;
202
202
}
203
+ if target_os ( ) . trim ( ) == "tvos" {
204
+ cmake_cfg. define ( "CMAKE_SYSTEM_NAME" , "tvOS" ) ;
205
+ if effective_target ( ) . ends_with ( "-tvos-sim" ) || target_arch ( ) == "x86_64" {
206
+ cmake_cfg. define ( "CMAKE_OSX_SYSROOT" , "appletvsimulator" ) ;
207
+ } else {
208
+ cmake_cfg. define ( "CMAKE_OSX_SYSROOT" , "appletvos" ) ;
209
+ }
210
+ }
203
211
}
204
212
205
213
if target_os ( ) == "android" {
Original file line number Diff line number Diff line change @@ -915,6 +915,7 @@ fn invoke_external_bindgen(
915
915
if let Some ( prefix_str) = prefix {
916
916
sym_prefix = if target_os ( ) . to_lowercase ( ) == "macos"
917
917
|| target_os ( ) . to_lowercase ( ) == "ios"
918
+ || target_os ( ) . to_lowercase ( ) == "tvos"
918
919
|| ( target_os ( ) . to_lowercase ( ) == "windows" && target_arch ( ) == "x86" )
919
920
{
920
921
format ! ( "_{prefix_str}_" )
You can’t perform that action at this time.
0 commit comments