@@ -594,22 +594,16 @@ fn copy_dynamic_libraries(sdl2_compiled_path: &PathBuf, target_os: &str) {
594
594
let src_dll_path = sdl2_bin_path. join ( sdl2_dll_name) ;
595
595
596
596
copy_library_file ( & src_dll_path, & target_path) ;
597
- } else if target_os. contains ( "linux" ) {
597
+ } else if target_os != "emscripten" {
598
598
// Find all libraries build and copy them, symlinks included.
599
599
let lib_path = sdl2_compiled_path. join ( "lib" ) ;
600
600
for entry in std:: fs:: read_dir ( & lib_path) . expect ( "Couldn't readdir lib" ) {
601
601
let entry = entry. expect ( "Error looking at lib dir" ) ;
602
- let filename = entry. file_name ( ) ;
603
- let filename = filename. to_string_lossy ( ) ;
604
- if filename. starts_with ( "lib" )
605
- && ( filename. ends_with ( ".so" ) || filename. contains ( ".so." ) )
606
- {
607
- if let Ok ( file_type) = entry. file_type ( ) {
608
- if file_type. is_symlink ( ) {
609
- copy_library_symlink ( & entry. path ( ) , & target_path) ;
610
- } else {
611
- copy_library_file ( & entry. path ( ) , & target_path)
612
- }
602
+ if let Ok ( file_type) = entry. file_type ( ) {
603
+ if file_type. is_symlink ( ) {
604
+ copy_library_symlink ( & entry. path ( ) , & target_path) ;
605
+ } else if file_type. is_file ( ) {
606
+ copy_library_file ( & entry. path ( ) , & target_path)
613
607
}
614
608
}
615
609
}
0 commit comments