From 09abf1b529b4226f585ecfbb20866715b901755b Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 1 Dec 2021 13:34:22 +0800 Subject: +fpm --- Client/ThirdParty/SDL2/docs/README-cmake.md | 168 ++++++++++++++-------------- 1 file changed, 84 insertions(+), 84 deletions(-) (limited to 'Client/ThirdParty/SDL2/docs/README-cmake.md') diff --git a/Client/ThirdParty/SDL2/docs/README-cmake.md b/Client/ThirdParty/SDL2/docs/README-cmake.md index 0eeb6d7..b13f2d2 100644 --- a/Client/ThirdParty/SDL2/docs/README-cmake.md +++ b/Client/ThirdParty/SDL2/docs/README-cmake.md @@ -1,84 +1,84 @@ -CMake -================================================================================ -(www.cmake.org) - -SDL's build system was traditionally based on autotools. Over time, this -approach has suffered from several issues across the different supported -platforms. -To solve these problems, a new build system based on CMake is under development. -It works in parallel to the legacy system, so users can experiment with it -without complication. -While still experimental, the build system should be usable on the following -platforms: - -* FreeBSD -* Linux -* VS.NET 2010 -* MinGW and Msys -* macOS, iOS, and tvOS, with support for XCode - - -================================================================================ -Usage -================================================================================ - -Assuming the source for SDL is located at ~/sdl - - cd ~ - mkdir build - cd build - cmake ../sdl - -This will build the static and dynamic versions of SDL in the ~/build directory. - - -================================================================================ -Usage, iOS/tvOS -================================================================================ - -CMake 3.14+ natively includes support for iOS and tvOS. SDL binaries may be built -using Xcode or Make, possibly among other build-systems. - -When using a recent version of CMake (3.14+), it should be possible to: - -- build SDL for iOS, both static and dynamic -- build SDL test apps (as iOS/tvOS .app bundles) -- generate a working SDL_config.h for iOS (using SDL_config.h.cmake as a basis) - -To use, set the following CMake variables when running CMake's configuration stage: - -- `CMAKE_SYSTEM_NAME=` (either `iOS` or `tvOS`) -- `CMAKE_OSX_SYSROOT=` (examples: `iphoneos`, `iphonesimulator`, `iphoneos12.4`, `/full/path/to/iPhoneOS.sdk`, - `appletvos`, `appletvsimulator`, `appletvos12.4`, `/full/path/to/AppleTVOS.sdk`, etc.) -- `CMAKE_OSX_ARCHITECTURES=` (example: "arm64;armv7s;x86_64") - - -### Examples (for iOS/tvOS): - -- for iOS-Simulator, using the latest, installed SDK: - - `cmake ~/sdl -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphonesimulator -DCMAKE_OSX_ARCHITECTURES=x86_64` - -- for iOS-Device, using the latest, installed SDK, 64-bit only - - `cmake ~/sdl -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphoneos -DCMAKE_OSX_ARCHITECTURES=arm64` - -- for iOS-Device, using the latest, installed SDK, mixed 32/64 bit - - `cmake ~/sdl -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphoneos -DCMAKE_OSX_ARCHITECTURES="arm64;armv7s"` - -- for iOS-Device, using a specific SDK revision (iOS 12.4, in this example): - - `cmake ~/sdl -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphoneos12.4 -DCMAKE_OSX_ARCHITECTURES=arm64` - -- for iOS-Simulator, using the latest, installed SDK, and building SDL test apps (as .app bundles): - - `cmake ~/sdl -DSDL_TEST=1 -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphonesimulator -DCMAKE_OSX_ARCHITECTURES=x86_64` - -- for tvOS-Simulator, using the latest, installed SDK: - - `cmake ~/sdl -DCMAKE_SYSTEM_NAME=tvOS -DCMAKE_OSX_SYSROOT=appletvsimulator -DCMAKE_OSX_ARCHITECTURES=x86_64` - -- for tvOS-Device, using the latest, installed SDK: - - `cmake ~/sdl -DCMAKE_SYSTEM_NAME=tvOS -DCMAKE_OSX_SYSROOT=appletvos -DCMAKE_OSX_ARCHITECTURES=arm64` +CMake +================================================================================ +(www.cmake.org) + +SDL's build system was traditionally based on autotools. Over time, this +approach has suffered from several issues across the different supported +platforms. +To solve these problems, a new build system based on CMake is under development. +It works in parallel to the legacy system, so users can experiment with it +without complication. +While still experimental, the build system should be usable on the following +platforms: + +* FreeBSD +* Linux +* VS.NET 2010 +* MinGW and Msys +* macOS, iOS, and tvOS, with support for XCode + + +================================================================================ +Usage +================================================================================ + +Assuming the source for SDL is located at ~/sdl + + cd ~ + mkdir build + cd build + cmake ../sdl + +This will build the static and dynamic versions of SDL in the ~/build directory. + + +================================================================================ +Usage, iOS/tvOS +================================================================================ + +CMake 3.14+ natively includes support for iOS and tvOS. SDL binaries may be built +using Xcode or Make, possibly among other build-systems. + +When using a recent version of CMake (3.14+), it should be possible to: + +- build SDL for iOS, both static and dynamic +- build SDL test apps (as iOS/tvOS .app bundles) +- generate a working SDL_config.h for iOS (using SDL_config.h.cmake as a basis) + +To use, set the following CMake variables when running CMake's configuration stage: + +- `CMAKE_SYSTEM_NAME=` (either `iOS` or `tvOS`) +- `CMAKE_OSX_SYSROOT=` (examples: `iphoneos`, `iphonesimulator`, `iphoneos12.4`, `/full/path/to/iPhoneOS.sdk`, + `appletvos`, `appletvsimulator`, `appletvos12.4`, `/full/path/to/AppleTVOS.sdk`, etc.) +- `CMAKE_OSX_ARCHITECTURES=` (example: "arm64;armv7s;x86_64") + + +### Examples (for iOS/tvOS): + +- for iOS-Simulator, using the latest, installed SDK: + + `cmake ~/sdl -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphonesimulator -DCMAKE_OSX_ARCHITECTURES=x86_64` + +- for iOS-Device, using the latest, installed SDK, 64-bit only + + `cmake ~/sdl -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphoneos -DCMAKE_OSX_ARCHITECTURES=arm64` + +- for iOS-Device, using the latest, installed SDK, mixed 32/64 bit + + `cmake ~/sdl -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphoneos -DCMAKE_OSX_ARCHITECTURES="arm64;armv7s"` + +- for iOS-Device, using a specific SDK revision (iOS 12.4, in this example): + + `cmake ~/sdl -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphoneos12.4 -DCMAKE_OSX_ARCHITECTURES=arm64` + +- for iOS-Simulator, using the latest, installed SDK, and building SDL test apps (as .app bundles): + + `cmake ~/sdl -DSDL_TEST=1 -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphonesimulator -DCMAKE_OSX_ARCHITECTURES=x86_64` + +- for tvOS-Simulator, using the latest, installed SDK: + + `cmake ~/sdl -DCMAKE_SYSTEM_NAME=tvOS -DCMAKE_OSX_SYSROOT=appletvsimulator -DCMAKE_OSX_ARCHITECTURES=x86_64` + +- for tvOS-Device, using the latest, installed SDK: + + `cmake ~/sdl -DCMAKE_SYSTEM_NAME=tvOS -DCMAKE_OSX_SYSROOT=appletvos -DCMAKE_OSX_ARCHITECTURES=arm64` -- cgit v1.1-26-g67d0