Browse Source

On macOS/iOS, use apple.mm, macos.mm and/os ios.mm

Fixes #2068
Ryan Carsten Schmidt 1 year ago
parent
commit
e26106222a
1 changed files with 16 additions and 2 deletions
  1. 16 2
      CMakeLists.txt

+ 16 - 2
CMakeLists.txt

@@ -305,13 +305,27 @@ target_link_libraries(love_common PUBLIC
 
 
 if (APPLE)
 if (APPLE)
 	target_sources(love_common PRIVATE
 	target_sources(love_common PRIVATE
-		src/common/macos.mm
+		src/common/apple.mm
 	)
 	)
 	target_link_libraries(love_common PUBLIC
 	target_link_libraries(love_common PUBLIC
 		objc
 		objc
 		"-framework CoreFoundation"
 		"-framework CoreFoundation"
-		"-framework AppKit"
 	)
 	)
+	if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+		target_sources(love_common PRIVATE
+			src/common/macos.mm
+		)
+		target_link_libraries(love_common PUBLIC
+			"-framework AppKit"
+		)
+	else()
+		target_sources(love_common PRIVATE
+			src/common/ios.mm
+		)
+		target_link_libraries(love_common PUBLIC
+			"-framework UIKit"
+		)
+	endif()
 endif()
 endif()
 
 
 #
 #