@@ -811,6 +811,18 @@ export class XCodeExporter extends Exporter {
811811 if ( platform === Platform . OSX && ( ! options . lib && ! options . dynlib ) ) {
812812 this . p ( 'COMBINE_HIDPI_IMAGES = YES;' , 4 ) ;
813813 }
814+
815+ this . p ( '"EXCLUDED_SOURCE_FILE_NAMES[arch=*]" = (' , 4 ) ;
816+ for ( let fileobject of project . getFiles ( ) ) {
817+ let file = fileobject . file ;
818+ if ( file . endsWith ( '.cpp' ) || file . endsWith ( '.c' ) || file . endsWith ( '.cc' ) || file . endsWith ( '.cxx' ) || file . endsWith ( '.m' ) || file . endsWith ( '.mm' ) ) {
819+ if ( fileobject . options && fileobject . options . nocompile ) {
820+ this . p ( '"' + file + '",' , 5 ) ;
821+ }
822+ }
823+ }
824+ this . p ( ');' , 4 ) ;
825+
814826 this . p ( 'FRAMEWORK_SEARCH_PATHS = (' , 4 ) ;
815827 this . p ( '"$(inherited)",' , 5 ) ;
816828 // Search paths to local frameworks
@@ -906,6 +918,18 @@ export class XCodeExporter extends Exporter {
906918 if ( platform === Platform . OSX && ( ! options . lib && ! options . dynlib ) ) {
907919 this . p ( 'COMBINE_HIDPI_IMAGES = YES;' , 4 ) ;
908920 }
921+
922+ this . p ( '"EXCLUDED_SOURCE_FILE_NAMES[arch=*]" = (' , 4 ) ;
923+ for ( let fileobject of project . getFiles ( ) ) {
924+ let file = fileobject . file ;
925+ if ( file . endsWith ( '.cpp' ) || file . endsWith ( '.c' ) || file . endsWith ( '.cc' ) || file . endsWith ( '.cxx' ) || file . endsWith ( '.m' ) || file . endsWith ( '.mm' ) ) {
926+ if ( fileobject . options && fileobject . options . nocompile ) {
927+ this . p ( '"' + file + '",' , 5 ) ;
928+ }
929+ }
930+ }
931+ this . p ( ');' , 4 ) ;
932+
909933 this . p ( 'FRAMEWORK_SEARCH_PATHS = (' , 4 ) ;
910934 this . p ( '"$(inherited)",' , 5 ) ;
911935 // Search paths to local frameworks
0 commit comments