mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 15:44:36 +00:00
Merge pull request #771 from Azaezel/alpha40/macCompile
correct mac compilation
This commit is contained in:
commit
113f9da67f
2 changed files with 16 additions and 0 deletions
|
|
@ -46,6 +46,9 @@
|
||||||
#if defined(__FreeBSD__)
|
#if defined(__FreeBSD__)
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(__APPLE__)
|
||||||
|
#include <sys/syslimits.h>
|
||||||
|
#endif
|
||||||
#include <utime.h>
|
#include <utime.h>
|
||||||
|
|
||||||
/* these are for reading directors, getting stats, etc. */
|
/* these are for reading directors, getting stats, etc. */
|
||||||
|
|
|
||||||
|
|
@ -467,6 +467,19 @@ if(WIN32)
|
||||||
ENDFOREACH()
|
ENDFOREACH()
|
||||||
endif()
|
endif()
|
||||||
else()
|
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
|
# TODO: improve default settings on other platforms
|
||||||
set(TORQUE_CXX_FLAGS_EXECUTABLES "" CACHE STRING "")
|
set(TORQUE_CXX_FLAGS_EXECUTABLES "" CACHE STRING "")
|
||||||
mark_as_advanced(TORQUE_CXX_FLAGS_EXECUTABLES)
|
mark_as_advanced(TORQUE_CXX_FLAGS_EXECUTABLES)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue