forked from Green-Sky/tomato
update sdl Merge commit '644725478f4de0f074a6834e8423ac36dce3974f'
This commit is contained in:
22
external/sdl/SDL/CMakeLists.txt
vendored
22
external/sdl/SDL/CMakeLists.txt
vendored
@ -4,6 +4,9 @@ if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)
|
||||
message(FATAL_ERROR "Prevented in-tree build. Please create a build directory outside of the SDL source code and run \"cmake -S ${CMAKE_SOURCE_DIR} -B .\" from there")
|
||||
endif()
|
||||
|
||||
# MSVC runtime library flags are selected by an abstraction.
|
||||
set(CMAKE_POLICY_DEFAULT_CMP0091 NEW)
|
||||
|
||||
# See docs/release_checklist.md
|
||||
project(SDL3 LANGUAGES C CXX VERSION "3.0.0")
|
||||
|
||||
@ -112,8 +115,8 @@ endif()
|
||||
# for systems without support. It's not currently enough to not use
|
||||
# pthread functions in a pthread-build; it won't start up on unsupported
|
||||
# browsers. As such, you have to explicitly enable it on Emscripten builds
|
||||
# for the time being. This default with change to ON once this becomes
|
||||
# commonly supported in browsers or the Emscripten teams makes a single
|
||||
# for the time being. This default will change to ON once this becomes
|
||||
# commonly supported in browsers or the Emscripten team makes a single
|
||||
# binary work everywhere.
|
||||
if (UNIX_OR_MAC_SYS AND NOT EMSCRIPTEN)
|
||||
set(SDL_PTHREADS_DEFAULT ON)
|
||||
@ -137,14 +140,6 @@ else()
|
||||
set(SDL_HIDAPI_LIBUSB_AVAILABLE TRUE)
|
||||
endif()
|
||||
|
||||
# On the other hand, *BSD specifically uses libusb only, so we make a special
|
||||
# case just for them.
|
||||
if(FREEBSD OR NETBSD OR OPENBSD OR BSDI)
|
||||
set(SDL_HIDAPI_LIBUSB_DEFAULT TRUE)
|
||||
else()
|
||||
set(SDL_HIDAPI_LIBUSB_DEFAULT FALSE)
|
||||
endif()
|
||||
|
||||
set(SDL_ASSEMBLY_DEFAULT OFF)
|
||||
if(USE_CLANG OR USE_GCC OR USE_INTELCC OR MSVC_VERSION GREATER 1400)
|
||||
set(SDL_ASSEMBLY_DEFAULT ON)
|
||||
@ -166,6 +161,9 @@ endif()
|
||||
if(MSVC)
|
||||
option(SDL_FORCE_STATIC_VCRT "Force /MT for static VC runtimes" OFF)
|
||||
if(SDL_FORCE_STATIC_VCRT)
|
||||
if(NOT DEFINED CMAKE_MSVC_RUNTIME_LIBRARY)
|
||||
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||
endif()
|
||||
foreach(flag_var
|
||||
CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
|
||||
CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO)
|
||||
@ -349,7 +347,8 @@ set_option(SDL_OFFSCREEN "Use offscreen video driver" ON)
|
||||
option_string(SDL_BACKGROUNDING_SIGNAL "number to use for magic backgrounding signal or 'OFF'" OFF)
|
||||
option_string(SDL_FOREGROUNDING_SIGNAL "number to use for magic foregrounding signal or 'OFF'" OFF)
|
||||
dep_option(SDL_HIDAPI "Enable the HIDAPI subsystem" ON "NOT VISIONOS" OFF)
|
||||
dep_option(SDL_HIDAPI_LIBUSB "Use libusb for low level joystick drivers" ${SDL_HIDAPI_LIBUSB_DEFAULT} "SDL_HIDAPI;${SDL_HIDAPI_LIBUSB_AVAILABLE}" OFF)
|
||||
dep_option(SDL_HIDAPI_LIBUSB "Use libusb for low level joystick drivers" ON SDL_HIDAPI_LIBUSB_AVAILABLE OFF)
|
||||
dep_option(SDL_HIDAPI_LIBUSB_SHARED "Dynamically load libusb support" ON SDL_HIDAPI_LIBUSB OFF)
|
||||
dep_option(SDL_HIDAPI_JOYSTICK "Use HIDAPI for low level joystick drivers" ON SDL_HIDAPI OFF)
|
||||
dep_option(SDL_VIRTUAL_JOYSTICK "Enable the virtual-joystick driver" ON SDL_HIDAPI OFF)
|
||||
set_option(SDL_LIBUDEV "Enable libudev support" ON)
|
||||
@ -3367,6 +3366,7 @@ if(NOT SDL_DISABLE_INSTALL)
|
||||
SDL_generate_manpages(
|
||||
SYMBOL "SDL_Init"
|
||||
WIKIHEADERS_PL_PATH "${CMAKE_CURRENT_SOURCE_DIR}/build-scripts/wikiheaders.pl"
|
||||
REVISION "${SDL_REVISION}"
|
||||
)
|
||||
if(TARGET SDL3-javadoc)
|
||||
set(SDL_INSTALL_JAVADOCDIR "${CMAKE_INSTALL_DATAROOTDIR}/javadoc" CACHE PATH "Path where to install SDL3 javadoc")
|
||||
|
Reference in New Issue
Block a user