mirror of
https://github.com/Ryujinx/SDL.git
synced 2024-12-23 05:15:28 +00:00
add 'Misc' subsystem
This commit is contained in:
parent
942b01a54c
commit
998117b3ff
|
@ -361,7 +361,7 @@ set(LONGESTOPTIONNAME 0) # set_option and friends will change this.
|
||||||
|
|
||||||
set(SDL_SUBSYSTEMS
|
set(SDL_SUBSYSTEMS
|
||||||
Atomic Audio Video Render Events Joystick Haptic Hidapi Power Threads Timers
|
Atomic Audio Video Render Events Joystick Haptic Hidapi Power Threads Timers
|
||||||
File Loadso CPUinfo Filesystem Dlopen Sensor Locale)
|
File Loadso CPUinfo Filesystem Dlopen Sensor Locale Misc)
|
||||||
foreach(_SUB ${SDL_SUBSYSTEMS})
|
foreach(_SUB ${SDL_SUBSYSTEMS})
|
||||||
string(TOUPPER ${_SUB} _OPT)
|
string(TOUPPER ${_SUB} _OPT)
|
||||||
if (NOT DEFINED SDL_${_OPT}_ENABLED_BY_DEFAULT)
|
if (NOT DEFINED SDL_${_OPT}_ENABLED_BY_DEFAULT)
|
||||||
|
@ -1037,9 +1037,11 @@ if(ANDROID)
|
||||||
file(GLOB ANDROID_CORE_SOURCES ${SDL2_SOURCE_DIR}/src/core/android/*.c)
|
file(GLOB ANDROID_CORE_SOURCES ${SDL2_SOURCE_DIR}/src/core/android/*.c)
|
||||||
set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_CORE_SOURCES} ${ANDROID_NDK}/sources/android/cpufeatures/cpu-features.c)
|
set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_CORE_SOURCES} ${ANDROID_NDK}/sources/android/cpufeatures/cpu-features.c)
|
||||||
|
|
||||||
file(GLOB ANDROID_MISC_SOURCES ${SDL2_SOURCE_DIR}/src/misc/android/*.c)
|
if(SDL_MISC)
|
||||||
set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_MISC_SOURCES})
|
file(GLOB ANDROID_MISC_SOURCES ${SDL2_SOURCE_DIR}/src/misc/android/*.c)
|
||||||
set(HAVE_SDL_MISC TRUE)
|
set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_MISC_SOURCES})
|
||||||
|
set(HAVE_SDL_MISC TRUE)
|
||||||
|
endif()
|
||||||
|
|
||||||
# SDL_spinlock.c Needs to be compiled in ARM mode.
|
# SDL_spinlock.c Needs to be compiled in ARM mode.
|
||||||
# There seems to be no better way currently to set the ARM mode.
|
# There seems to be no better way currently to set the ARM mode.
|
||||||
|
@ -1449,9 +1451,11 @@ elseif(UNIX AND NOT APPLE AND NOT ANDROID AND NOT RISCOS AND NOT HAIKU)
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DHAVE_LINUX_VERSION_H")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DHAVE_LINUX_VERSION_H")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
file(GLOB MISC_SOURCES ${SDL2_SOURCE_DIR}/src/misc/unix/*.c)
|
if(SDL_MISC)
|
||||||
set(SOURCE_FILES ${SOURCE_FILES} ${MISC_SOURCES})
|
file(GLOB MISC_SOURCES ${SDL2_SOURCE_DIR}/src/misc/unix/*.c)
|
||||||
set(HAVE_SDL_MISC TRUE)
|
set(SOURCE_FILES ${SOURCE_FILES} ${MISC_SOURCES})
|
||||||
|
set(HAVE_SDL_MISC TRUE)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(SDL_POWER)
|
if(SDL_POWER)
|
||||||
if(LINUX)
|
if(LINUX)
|
||||||
|
@ -1523,14 +1527,15 @@ elseif(WINDOWS)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WINDOWS_STORE)
|
if(SDL_MISC)
|
||||||
file(GLOB WINRT_MISC_SOURCES ${SDL2_SOURCE_DIR}/src/misc/winrt/*.cpp)
|
if(WINDOWS_STORE)
|
||||||
set(SOURCE_FILES ${SOURCE_FILES} ${WINRT_MISC_SOURCES})
|
file(GLOB MISC_SOURCES ${SDL2_SOURCE_DIR}/src/misc/winrt/*.cpp)
|
||||||
else()
|
else()
|
||||||
file(GLOB MISC_SOURCES ${SDL2_SOURCE_DIR}/src/misc/windows/*.c)
|
file(GLOB MISC_SOURCES ${SDL2_SOURCE_DIR}/src/misc/windows/*.c)
|
||||||
set(SOURCE_FILES ${SOURCE_FILES} ${MISC_SOURCES})
|
endif()
|
||||||
|
set(SOURCE_FILES ${SOURCE_FILES} ${MISC_SOURCES})
|
||||||
|
set(HAVE_SDL_MISC TRUE)
|
||||||
endif()
|
endif()
|
||||||
set(HAVE_SDL_MISC TRUE)
|
|
||||||
|
|
||||||
# Check for DirectX
|
# Check for DirectX
|
||||||
if(SDL_DIRECTX)
|
if(SDL_DIRECTX)
|
||||||
|
@ -1825,14 +1830,16 @@ elseif(APPLE)
|
||||||
message_error("SDL_FILE must be enabled to build on MacOS X")
|
message_error("SDL_FILE must be enabled to build on MacOS X")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(IOS OR TVOS)
|
if(SDL_MISC)
|
||||||
file(GLOB MISC_SOURCES ${SDL2_SOURCE_DIR}/src/misc/ios/*.m)
|
if(IOS OR TVOS)
|
||||||
file(GLOB SDLMAIN_SOURCES ${SDL2_SOURCE_DIR}/src/main/uikit/*.c)
|
file(GLOB MISC_SOURCES ${SDL2_SOURCE_DIR}/src/misc/ios/*.m)
|
||||||
else()
|
file(GLOB SDLMAIN_SOURCES ${SDL2_SOURCE_DIR}/src/main/uikit/*.c)
|
||||||
file(GLOB MISC_SOURCES ${SDL2_SOURCE_DIR}/src/misc/macosx/*.m)
|
else()
|
||||||
|
file(GLOB MISC_SOURCES ${SDL2_SOURCE_DIR}/src/misc/macosx/*.m)
|
||||||
|
endif()
|
||||||
|
set(SOURCE_FILES ${SOURCE_FILES} ${MISC_SOURCES})
|
||||||
|
set(HAVE_SDL_MISC TRUE)
|
||||||
endif()
|
endif()
|
||||||
set(SOURCE_FILES ${SOURCE_FILES} ${MISC_SOURCES})
|
|
||||||
set(HAVE_SDL_MISC TRUE)
|
|
||||||
|
|
||||||
if(SDL_AUDIO)
|
if(SDL_AUDIO)
|
||||||
set(SDL_AUDIO_DRIVER_COREAUDIO 1)
|
set(SDL_AUDIO_DRIVER_COREAUDIO 1)
|
||||||
|
@ -2127,9 +2134,11 @@ elseif(HAIKU)
|
||||||
set(HAVE_SDL_JOYSTICK TRUE)
|
set(HAVE_SDL_JOYSTICK TRUE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
file(GLOB MISC_SOURCES ${SDL2_SOURCE_DIR}/src/misc/haiku/*.cc)
|
if(SDL_MISC)
|
||||||
set(SOURCE_FILES ${SOURCE_FILES} ${MISC_SOURCES})
|
file(GLOB MISC_SOURCES ${SDL2_SOURCE_DIR}/src/misc/haiku/*.cc)
|
||||||
set(HAVE_SDL_MISC TRUE)
|
set(SOURCE_FILES ${SOURCE_FILES} ${MISC_SOURCES})
|
||||||
|
set(HAVE_SDL_MISC TRUE)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(SDL_VIDEO)
|
if(SDL_VIDEO)
|
||||||
set(SDL_VIDEO_DRIVER_HAIKU 1)
|
set(SDL_VIDEO_DRIVER_HAIKU 1)
|
||||||
|
@ -2181,9 +2190,11 @@ elseif(HAIKU)
|
||||||
list(APPEND EXTRA_LIBS root be media game device textencoding)
|
list(APPEND EXTRA_LIBS root be media game device textencoding)
|
||||||
|
|
||||||
elseif(RISCOS)
|
elseif(RISCOS)
|
||||||
file(GLOB MISC_SOURCES ${SDL2_SOURCE_DIR}/src/misc/riscos/*.c)
|
if(SDL_MISC)
|
||||||
set(SOURCE_FILES ${SOURCE_FILES} ${MISC_SOURCES})
|
file(GLOB MISC_SOURCES ${SDL2_SOURCE_DIR}/src/misc/riscos/*.c)
|
||||||
set(HAVE_SDL_MISC TRUE)
|
set(SOURCE_FILES ${SOURCE_FILES} ${MISC_SOURCES})
|
||||||
|
set(HAVE_SDL_MISC TRUE)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(SDL_VIDEO)
|
if(SDL_VIDEO)
|
||||||
set(SDL_VIDEO_DRIVER_RISCOS 1)
|
set(SDL_VIDEO_DRIVER_RISCOS 1)
|
||||||
|
@ -2223,9 +2234,11 @@ elseif(VITA)
|
||||||
set_source_files_properties(${SDL2_SOURCE_DIR}/src/atomic/SDL_spinlock.c PROPERTIES COMPILE_FLAGS -marm)
|
set_source_files_properties(${SDL2_SOURCE_DIR}/src/atomic/SDL_spinlock.c PROPERTIES COMPILE_FLAGS -marm)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
file(GLOB MISC_SOURCES ${SDL2_SOURCE_DIR}/src/misc/vita/*.c)
|
if(SDL_MISC)
|
||||||
set(SOURCE_FILES ${SOURCE_FILES} ${MISC_SOURCES})
|
file(GLOB MISC_SOURCES ${SDL2_SOURCE_DIR}/src/misc/vita/*.c)
|
||||||
set(HAVE_SDL_MISC TRUE)
|
set(SOURCE_FILES ${SOURCE_FILES} ${MISC_SOURCES})
|
||||||
|
set(HAVE_SDL_MISC TRUE)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(SDL_AUDIO)
|
if(SDL_AUDIO)
|
||||||
set(SDL_AUDIO_DRIVER_VITA 1)
|
set(SDL_AUDIO_DRIVER_VITA 1)
|
||||||
|
|
|
@ -278,6 +278,7 @@
|
||||||
#cmakedefine SDL_POWER_DISABLED @SDL_POWER_DISABLED@
|
#cmakedefine SDL_POWER_DISABLED @SDL_POWER_DISABLED@
|
||||||
#cmakedefine SDL_FILESYSTEM_DISABLED @SDL_FILESYSTEM_DISABLED@
|
#cmakedefine SDL_FILESYSTEM_DISABLED @SDL_FILESYSTEM_DISABLED@
|
||||||
#cmakedefine SDL_LOCALE_DISABLED @SDL_LOCALE_DISABLED@
|
#cmakedefine SDL_LOCALE_DISABLED @SDL_LOCALE_DISABLED@
|
||||||
|
#cmakedefine SDL_MISC_DISABLED @SDL_MISC_DISABLED@
|
||||||
|
|
||||||
/* Enable various audio drivers */
|
/* Enable various audio drivers */
|
||||||
#cmakedefine SDL_AUDIO_DRIVER_ALSA @SDL_AUDIO_DRIVER_ALSA@
|
#cmakedefine SDL_AUDIO_DRIVER_ALSA @SDL_AUDIO_DRIVER_ALSA@
|
||||||
|
|
|
@ -264,6 +264,7 @@
|
||||||
#undef SDL_POWER_DISABLED
|
#undef SDL_POWER_DISABLED
|
||||||
#undef SDL_FILESYSTEM_DISABLED
|
#undef SDL_FILESYSTEM_DISABLED
|
||||||
#undef SDL_LOCALE_DISABLED
|
#undef SDL_LOCALE_DISABLED
|
||||||
|
#undef SDL_MISC_DISABLED
|
||||||
|
|
||||||
/* Enable various audio drivers */
|
/* Enable various audio drivers */
|
||||||
#undef SDL_AUDIO_DRIVER_AAUDIO
|
#undef SDL_AUDIO_DRIVER_AAUDIO
|
||||||
|
|
Loading…
Reference in a new issue