mirror of
https://github.com/love2d/love.git
synced 2026-08-12 08:30:56 +02:00
Merge pull request #1772 from eliteraspberries/cmake-macos
CMake: Allow LuaJIT on macOS. Note that love doesn't officially support using cmake on Apple platforms.
This commit is contained in:
+11
-2
@@ -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()
|
||||
@@ -317,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})
|
||||
@@ -1608,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})
|
||||
@@ -1727,6 +1735,7 @@ set(LOVE_LIB_SRC
|
||||
)
|
||||
|
||||
include_directories(
|
||||
BEFORE
|
||||
src
|
||||
src/libraries
|
||||
src/modules
|
||||
|
||||
Reference in New Issue
Block a user