mirror of
				https://github.com/libsdl-org/SDL.git
				synced 2025-10-26 12:27:44 +00:00 
			
		
		
		
	Fix compilation for .m files extension
This commit is contained in:
		 Luca Lolli
					Luca Lolli
				
			
				
					committed by
					
						 Anonymous Maarten
						Anonymous Maarten
					
				
			
			
				
	
			
			
			 Anonymous Maarten
						Anonymous Maarten
					
				
			
						parent
						
							4c704ecfdd
						
					
				
				
					commit
					b50e429354
				
			| @@ -3224,6 +3224,15 @@ if(PS2) | ||||
|   target_compile_options(sdl-build-options INTERFACE "-Wno-error=declaration-after-statement") | ||||
| endif() | ||||
|  | ||||
| if(APPLE) | ||||
|   foreach(SOURCE_FILE ${SOURCE_FILES}) | ||||
|     get_filename_component(FILE_EXTENSION ${SOURCE_FILE} EXT) | ||||
|     if(FILE_EXTENSION STREQUAL "m") | ||||
|       set_property(SOURCE ${SOURCE_FILE} APPEND_STRING PROPERTY COMPILE_FLAGS " -x objective-c") | ||||
|     endif() | ||||
|   endforeach() | ||||
| endif() | ||||
|  | ||||
| if(SDL_SHARED) | ||||
|   add_library(SDL2 SHARED ${SOURCE_FILES} ${VERSION_SOURCES}) | ||||
|   add_dependencies(SDL2 sdl_headers_copy) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user