early-access version 2835
This commit is contained in:
29
externals/SDL/cmake/macros.cmake
vendored
29
externals/SDL/cmake/macros.cmake
vendored
@@ -17,8 +17,8 @@ macro(SET_OPTION _NAME _DESC)
|
||||
endmacro()
|
||||
|
||||
macro(DEP_OPTION _NAME _DESC _DEFLT _DEPTEST _FAILDFLT)
|
||||
add_to_alloptions(${_NAME})
|
||||
cmake_dependent_option(${_NAME} ${_DESC} ${_DEFLT} ${_DEPTEST} ${_FAILDFLT})
|
||||
add_to_alloptions("${_NAME}")
|
||||
cmake_dependent_option("${_NAME}" "${_DESC}" "${_DEFLT}" "${_DEPTEST}" "${_FAILDFLT}")
|
||||
endmacro()
|
||||
|
||||
macro(OPTION_STRING _NAME _DESC _VALUE)
|
||||
@@ -92,11 +92,22 @@ macro(LISTTOSTRREV _LIST _OUTPUT)
|
||||
endforeach()
|
||||
endmacro()
|
||||
|
||||
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()
|
||||
|
||||
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()
|
||||
|
||||
if(CMAKE_VERSION VERSION_LESS 3.13.0)
|
||||
macro(target_link_directories _TARGET _SCOPE)
|
||||
link_directories(${ARGN})
|
||||
endmacro()
|
||||
endif()
|
||||
|
Reference in New Issue
Block a user