From a6b6103b87091c9528307d2025551c02833fad25 Mon Sep 17 00:00:00 2001 From: Mansour Moufid Date: Sun, 6 Feb 2022 16:38:21 -0500 Subject: [PATCH 1/3] Enable LuaJIT on macOS. --- CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7c59eaa6d..9251797f8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,12 +48,16 @@ else() set(LOVE_TARGET_PLATFORM x86) endif() -option(LOVE_JIT "Use LuaJIT" TRUE) +if(APPLE) + option(LOVE_JIT "Use LuaJIT" FALSE) +else() + option(LOVE_JIT "Use LuaJIT" TRUE) +endif() option(LOVE_MPG123 "Use mpg123" TRUE) if(LOVE_JIT) if(APPLE) - message(FATAL_ERROR "JIT not supported yet on Mac. Please use -DLOVE_JIT=0.") + message(WARNING "JIT not supported yet on Mac.") endif() message(STATUS "LuaJIT: Enabled") else() From 440bbeb9b3195000f215e23e2721f5ad3ffad54e Mon Sep 17 00:00:00 2001 From: Mansour Moufid Date: Sun, 6 Feb 2022 16:38:47 -0500 Subject: [PATCH 2/3] Link to system frameworks. --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9251797f8..b461e8ebd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -321,6 +321,9 @@ if (APPLE) set(LOVE_SRC_COMMON ${LOVE_SRC_COMMON} src/common/macosx.mm ) + set(LOVE_LINK_LIBRARIES ${LOVE_LINK_LIBRARIES} objc) + set(LOVE_LINK_LIBRARIES ${LOVE_LINK_LIBRARIES} "-framework CoreFoundation") + set(LOVE_LINK_LIBRARIES ${LOVE_LINK_LIBRARIES} "-framework AppKit") endif() source_group("common" FILES ${LOVE_SRC_COMMON}) @@ -1612,6 +1615,7 @@ if(APPLE) set(LOVE_SRC_3P_PHYSFS ${LOVE_SRC_3P_PHYSFS} src/libraries/physfs/physfs_platform_apple.m ) + set(LOVE_LINK_LIBRARIES ${LOVE_LINK_LIBRARIES} "-framework IOKit") endif() add_library(love_3p_physfs ${LOVE_SRC_3P_PHYSFS}) From b822b9cbe7807a3cd2f1de842ae0cd4fd1f45caa Mon Sep 17 00:00:00 2001 From: Mansour Moufid Date: Sun, 6 Feb 2022 17:06:37 -0500 Subject: [PATCH 3/3] Prepend LOVE_INCLUDE_DIRS rather than append. --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index b461e8ebd..82b1c7883 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1735,6 +1735,7 @@ set(LOVE_LIB_SRC ) include_directories( + BEFORE src src/libraries src/modules