From e26106222aa1c73d52f061066bbeafe563193878 Mon Sep 17 00:00:00 2001 From: Ryan Carsten Schmidt Date: Fri, 10 May 2024 01:27:41 -0500 Subject: [PATCH] On macOS/iOS, use apple.mm, macos.mm and/os ios.mm Fixes #2068 --- CMakeLists.txt | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4145bcd5d..a1d8ddcd1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -305,13 +305,27 @@ target_link_libraries(love_common PUBLIC if (APPLE) target_sources(love_common PRIVATE - src/common/macos.mm + src/common/apple.mm ) target_link_libraries(love_common PUBLIC objc "-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() #