mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-19 20:24:49 +00:00
correct mac compilation
SDL now leverages https://cmake.org/cmake/help/v3.10/command/enable_language.html
This commit is contained in:
parent
3f796d2a06
commit
bd1bbdc258
|
|
@ -467,6 +467,19 @@ if(WIN32)
|
|||
ENDFOREACH()
|
||||
endif()
|
||||
else()
|
||||
if(${CMAKE_VERSION} VERSION_LESS "3.16.0")
|
||||
macro(CHECK_OBJC_SOURCE_COMPILES SOURCE VAR)
|
||||
set(PREV_REQUIRED_DEFS "${CMAKE_REQUIRED_DEFINITIONS}")
|
||||
set(CMAKE_REQUIRED_DEFINITIONS "-x objective-c ${PREV_REQUIRED_DEFS}")
|
||||
CHECK_C_SOURCE_COMPILES(${SOURCE} ${VAR})
|
||||
set(CMAKE_REQUIRED_DEFINITIONS "${PREV_REQUIRED_DEFS}")
|
||||
endmacro()
|
||||
else()
|
||||
include(CheckOBJCSourceCompiles)
|
||||
if (APPLE)
|
||||
enable_language(OBJC)
|
||||
endif()
|
||||
endif()
|
||||
# TODO: improve default settings on other platforms
|
||||
set(TORQUE_CXX_FLAGS_EXECUTABLES "" CACHE STRING "")
|
||||
mark_as_advanced(TORQUE_CXX_FLAGS_EXECUTABLES)
|
||||
|
|
|
|||
Loading…
Reference in a new issue