diff options
| author | 3gg <3gg@shellblade.net> | 2025-12-27 12:03:39 -0800 |
|---|---|---|
| committer | 3gg <3gg@shellblade.net> | 2025-12-27 12:03:39 -0800 |
| commit | 5a079a2d114f96d4847d1ee305d5b7c16eeec50e (patch) | |
| tree | 8926ab44f168acf787d8e19608857b3af0f82758 /contrib/SDL-3.2.8/build-scripts/pkg-support | |
Initial commit
Diffstat (limited to 'contrib/SDL-3.2.8/build-scripts/pkg-support')
15 files changed, 692 insertions, 0 deletions
diff --git a/contrib/SDL-3.2.8/build-scripts/pkg-support/android/INSTALL.md.in b/contrib/SDL-3.2.8/build-scripts/pkg-support/android/INSTALL.md.in new file mode 100644 index 0000000..80321c2 --- /dev/null +++ b/contrib/SDL-3.2.8/build-scripts/pkg-support/android/INSTALL.md.in | |||
| @@ -0,0 +1,91 @@ | |||
| 1 | |||
| 2 | # Using this package | ||
| 3 | |||
| 4 | This package contains @<@PROJECT_NAME@>@ built for the Android platform. | ||
| 5 | |||
| 6 | ## Gradle integration | ||
| 7 | |||
| 8 | For integration with CMake/ndk-build, it uses [prefab](https://google.github.io/prefab/). | ||
| 9 | |||
| 10 | Copy the aar archive (@<@PROJECT_NAME@>@-@<@PROJECT_VERSION@>@.aar) to a `app/libs` directory of your project. | ||
| 11 | |||
| 12 | In `app/build.gradle` of your Android project, add: | ||
| 13 | ``` | ||
| 14 | android { | ||
| 15 | /* ... */ | ||
| 16 | buildFeatures { | ||
| 17 | prefab true | ||
| 18 | } | ||
| 19 | } | ||
| 20 | dependencies { | ||
| 21 | implementation files('libs/@<@PROJECT_NAME@>@-@<@PROJECT_VERSION@>@.aar') | ||
| 22 | /* ... */ | ||
| 23 | } | ||
| 24 | ``` | ||
| 25 | |||
| 26 | If you're using CMake, add the following to your CMakeLists.txt: | ||
| 27 | ``` | ||
| 28 | find_package(@<@PROJECT_NAME@>@ REQUIRED CONFIG) | ||
| 29 | target_link_libraries(yourgame PRIVATE @<@PROJECT_NAME@>@::@<@PROJECT_NAME@>@) | ||
| 30 | ``` | ||
| 31 | |||
| 32 | If you use ndk-build, add the following before `include $(BUILD_SHARED_LIBRARY)` to your `Android.mk`: | ||
| 33 | ``` | ||
| 34 | LOCAL_SHARED_LIBARARIES := SDL3 SDL3-Headers | ||
| 35 | ``` | ||
| 36 | And add the following at the bottom: | ||
| 37 | ``` | ||
| 38 | # https://google.github.io/prefab/build-systems.html | ||
| 39 | |||
| 40 | # Add the prefab modules to the import path. | ||
| 41 | $(call import-add-path,/out) | ||
| 42 | |||
| 43 | # Import @<@PROJECT_NAME@>@ so we can depend on it. | ||
| 44 | $(call import-module,prefab/@<@PROJECT_NAME@>@) | ||
| 45 | ``` | ||
| 46 | |||
| 47 | --- | ||
| 48 | |||
| 49 | ## Other build systems (advanced) | ||
| 50 | |||
| 51 | If you want to build a project without Gradle, | ||
| 52 | running the following command will extract the Android archive into a more common directory structure. | ||
| 53 | ``` | ||
| 54 | python @<@PROJECT_NAME@>@-@<@PROJECT_VERSION@>@.aar -o android_prefix | ||
| 55 | ``` | ||
| 56 | Add `--help` for a list of all available options. | ||
| 57 | |||
| 58 | # Documentation | ||
| 59 | |||
| 60 | An API reference, tutorials, and additional documentation is available at: | ||
| 61 | |||
| 62 | https://wiki.libsdl.org/@<@PROJECT_NAME@>@ | ||
| 63 | |||
| 64 | # Example code | ||
| 65 | |||
| 66 | There are simple example programs available at: | ||
| 67 | |||
| 68 | https://examples.libsdl.org/SDL3 | ||
| 69 | |||
| 70 | # Discussions | ||
| 71 | |||
| 72 | ## Discord | ||
| 73 | |||
| 74 | You can join the official Discord server at: | ||
| 75 | |||
| 76 | https://discord.com/invite/BwpFGBWsv8 | ||
| 77 | |||
| 78 | ## Forums/mailing lists | ||
| 79 | |||
| 80 | You can join SDL development discussions at: | ||
| 81 | |||
| 82 | https://discourse.libsdl.org/ | ||
| 83 | |||
| 84 | Once you sign up, you can use the forum through the website or as a mailing list from your email client. | ||
| 85 | |||
| 86 | ## Announcement list | ||
| 87 | |||
| 88 | You can sign up for the low traffic announcement list at: | ||
| 89 | |||
| 90 | https://www.libsdl.org/mailing-list.php | ||
| 91 | |||
diff --git a/contrib/SDL-3.2.8/build-scripts/pkg-support/android/aar/__main__.py.in b/contrib/SDL-3.2.8/build-scripts/pkg-support/android/aar/__main__.py.in new file mode 100755 index 0000000..344cf71 --- /dev/null +++ b/contrib/SDL-3.2.8/build-scripts/pkg-support/android/aar/__main__.py.in | |||
| @@ -0,0 +1,104 @@ | |||
| 1 | #!/usr/bin/env python | ||
| 2 | |||
| 3 | """ | ||
| 4 | Create a @<@PROJECT_NAME@>@ SDK prefix from an Android archive | ||
| 5 | This file is meant to be placed in a the root of an android .aar archive | ||
| 6 | |||
| 7 | Example usage: | ||
| 8 | ```sh | ||
| 9 | python @<@PROJECT_NAME@>@-@<@PROJECT_VERSION@>@.aar -o /usr/opt/android-sdks | ||
| 10 | cmake -S my-project \ | ||
| 11 | -DCMAKE_PREFIX_PATH=/usr/opt/android-sdks \ | ||
| 12 | -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake \ | ||
| 13 | -B build-arm64 -DANDROID_ABI=arm64-v8a \ | ||
| 14 | -DCMAKE_BUILD_TYPE=Releaase | ||
| 15 | cmake --build build-arm64 | ||
| 16 | ``` | ||
| 17 | """ | ||
| 18 | import argparse | ||
| 19 | import io | ||
| 20 | import json | ||
| 21 | import os | ||
| 22 | import pathlib | ||
| 23 | import re | ||
| 24 | import stat | ||
| 25 | import zipfile | ||
| 26 | |||
| 27 | |||
| 28 | AAR_PATH = pathlib.Path(__file__).resolve().parent | ||
| 29 | ANDROID_ARCHS = { "armeabi-v7a", "arm64-v8a", "x86", "x86_64" } | ||
| 30 | |||
| 31 | |||
| 32 | def main(): | ||
| 33 | parser = argparse.ArgumentParser( | ||
| 34 | description="Convert a @<@PROJECT_NAME@>@ Android .aar archive into a SDK", | ||
| 35 | allow_abbrev=False, | ||
| 36 | ) | ||
| 37 | parser.add_argument("--version", action="version", version="@<@PROJECT_NAME@>@ @<@PROJECT_VERSION@>@") | ||
| 38 | parser.add_argument("-o", dest="output", type=pathlib.Path, required=True, help="Folder where to store the SDK") | ||
| 39 | args = parser.parse_args() | ||
| 40 | |||
| 41 | print(f"Creating a @<@PROJECT_NAME@>@ SDK at {args.output}...") | ||
| 42 | |||
| 43 | prefix = args.output | ||
| 44 | incdir = prefix / "include" | ||
| 45 | libdir = prefix / "lib" | ||
| 46 | |||
| 47 | RE_LIB_MODULE_ARCH = re.compile(r"prefab/modules/(?P<module>[A-Za-z0-9_-]+)/libs/android\.(?P<arch>[a-zA-Z0-9_-]+)/(?P<filename>lib[A-Za-z0-9_]+\.(?:so|a))") | ||
| 48 | RE_INC_MODULE_ARCH = re.compile(r"prefab/modules/(?P<module>[A-Za-z0-9_-]+)/include/(?P<header>[a-zA-Z0-9_./-]+)") | ||
| 49 | RE_LICENSE = re.compile(r"(?:.*/)?(?P<filename>(?:license|copying)(?:\.md|\.txt)?)", flags=re.I) | ||
| 50 | RE_PROGUARD = re.compile(r"(?:.*/)?(?P<filename>proguard.*\.(?:pro|txt))", flags=re.I) | ||
| 51 | RE_CMAKE = re.compile(r"(?:.*/)?(?P<filename>.*\.cmake)", flags=re.I) | ||
| 52 | |||
| 53 | with zipfile.ZipFile(AAR_PATH) as zf: | ||
| 54 | project_description = json.loads(zf.read("description.json")) | ||
| 55 | project_name = project_description["name"] | ||
| 56 | project_version = project_description["version"] | ||
| 57 | licensedir = prefix / "share/licenses" / project_name | ||
| 58 | cmakedir = libdir / "cmake" / project_name | ||
| 59 | javadir = prefix / "share/java" / project_name | ||
| 60 | javadocdir = prefix / "share/javadoc" / project_name | ||
| 61 | |||
| 62 | def read_zipfile_and_write(path: pathlib.Path, zippath: str): | ||
| 63 | data = zf.read(zippath) | ||
| 64 | path.parent.mkdir(parents=True, exist_ok=True) | ||
| 65 | path.write_bytes(data) | ||
| 66 | |||
| 67 | for zip_info in zf.infolist(): | ||
| 68 | zippath = zip_info.filename | ||
| 69 | if m := RE_LIB_MODULE_ARCH.match(zippath): | ||
| 70 | lib_path = libdir / m["arch"] / m["filename"] | ||
| 71 | read_zipfile_and_write(lib_path, zippath) | ||
| 72 | if m["filename"].endswith(".so"): | ||
| 73 | os.chmod(lib_path, stat.S_IRWXU | stat.S_IRGRP | stat.S_IXGRP | stat.S_IROTH | stat.S_IXOTH) | ||
| 74 | |||
| 75 | elif m := RE_INC_MODULE_ARCH.match(zippath): | ||
| 76 | header_path = incdir / m["header"] | ||
| 77 | read_zipfile_and_write(header_path, zippath) | ||
| 78 | elif m:= RE_LICENSE.match(zippath): | ||
| 79 | license_path = licensedir / m["filename"] | ||
| 80 | read_zipfile_and_write(license_path, zippath) | ||
| 81 | elif m:= RE_PROGUARD.match(zippath): | ||
| 82 | proguard_path = javadir / m["filename"] | ||
| 83 | read_zipfile_and_write(proguard_path, zippath) | ||
| 84 | elif m:= RE_CMAKE.match(zippath): | ||
| 85 | cmake_path = cmakedir / m["filename"] | ||
| 86 | read_zipfile_and_write(cmake_path, zippath) | ||
| 87 | elif zippath == "classes.jar": | ||
| 88 | versioned_jar_path = javadir / f"{project_name}-{project_version}.jar" | ||
| 89 | unversioned_jar_path = javadir / f"{project_name}.jar" | ||
| 90 | read_zipfile_and_write(versioned_jar_path, zippath) | ||
| 91 | os.symlink(src=versioned_jar_path.name, dst=unversioned_jar_path) | ||
| 92 | elif zippath == "classes-sources.jar": | ||
| 93 | jarpath = javadir / f"{project_name}-{project_version}-sources.jar" | ||
| 94 | read_zipfile_and_write(jarpath, zippath) | ||
| 95 | elif zippath == "classes-doc.jar": | ||
| 96 | jarpath = javadocdir / f"{project_name}-{project_version}-javadoc.jar" | ||
| 97 | read_zipfile_and_write(jarpath, zippath) | ||
| 98 | |||
| 99 | print("... done") | ||
| 100 | return 0 | ||
| 101 | |||
| 102 | |||
| 103 | if __name__ == "__main__": | ||
| 104 | raise SystemExit(main()) | ||
diff --git a/contrib/SDL-3.2.8/build-scripts/pkg-support/android/aar/cmake/SDL3ConfigVersion.cmake.in b/contrib/SDL-3.2.8/build-scripts/pkg-support/android/aar/cmake/SDL3ConfigVersion.cmake.in new file mode 100644 index 0000000..3268da7 --- /dev/null +++ b/contrib/SDL-3.2.8/build-scripts/pkg-support/android/aar/cmake/SDL3ConfigVersion.cmake.in | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | # @<@PROJECT_NAME@>@ CMake version configuration file: | ||
| 2 | # This file is meant to be placed in a lib/cmake/@<@PROJECT_NAME@>@ subfolder of a reconstructed Android SDL3 SDK | ||
| 3 | |||
| 4 | set(PACKAGE_VERSION "@<@PROJECT_VERSION@>@") | ||
| 5 | |||
| 6 | if(PACKAGE_FIND_VERSION_RANGE) | ||
| 7 | # Package version must be in the requested version range | ||
| 8 | if ((PACKAGE_FIND_VERSION_RANGE_MIN STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION_MIN) | ||
| 9 | OR ((PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_GREATER PACKAGE_FIND_VERSION_MAX) | ||
| 10 | OR (PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE" AND PACKAGE_VERSION VERSION_GREATER_EQUAL PACKAGE_FIND_VERSION_MAX))) | ||
| 11 | set(PACKAGE_VERSION_COMPATIBLE FALSE) | ||
| 12 | else() | ||
| 13 | set(PACKAGE_VERSION_COMPATIBLE TRUE) | ||
| 14 | endif() | ||
| 15 | else() | ||
| 16 | if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION) | ||
| 17 | set(PACKAGE_VERSION_COMPATIBLE FALSE) | ||
| 18 | else() | ||
| 19 | set(PACKAGE_VERSION_COMPATIBLE TRUE) | ||
| 20 | if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION) | ||
| 21 | set(PACKAGE_VERSION_EXACT TRUE) | ||
| 22 | endif() | ||
| 23 | endif() | ||
| 24 | endif() | ||
| 25 | |||
| 26 | # if the using project doesn't have CMAKE_SIZEOF_VOID_P set, fail. | ||
| 27 | if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "") | ||
| 28 | set(PACKAGE_VERSION_UNSUITABLE TRUE) | ||
| 29 | endif() | ||
| 30 | |||
| 31 | include("${CMAKE_CURRENT_LIST_DIR}/sdlcpu.cmake") | ||
| 32 | SDL_DetectTargetCPUArchitectures(_detected_archs) | ||
| 33 | |||
| 34 | # check that the installed version has a compatible architecture as the one which is currently searching: | ||
| 35 | if(NOT(SDL_CPU_X86 OR SDL_CPU_X64 OR SDL_CPU_ARM32 OR SDL_CPU_ARM64)) | ||
| 36 | set(PACKAGE_VERSION "${PACKAGE_VERSION} (X86,X64,ARM32,ARM64)") | ||
| 37 | set(PACKAGE_VERSION_UNSUITABLE TRUE) | ||
| 38 | endif() | ||
diff --git a/contrib/SDL-3.2.8/build-scripts/pkg-support/android/aar/description.json.in b/contrib/SDL-3.2.8/build-scripts/pkg-support/android/aar/description.json.in new file mode 100644 index 0000000..e75ef38 --- /dev/null +++ b/contrib/SDL-3.2.8/build-scripts/pkg-support/android/aar/description.json.in | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | { | ||
| 2 | "name": "@<@PROJECT_NAME@>@", | ||
| 3 | "version": "@<@PROJECT_VERSION@>@", | ||
| 4 | "git-hash": "@<@PROJECT_COMMIT@>@" | ||
| 5 | } | ||
diff --git a/contrib/SDL-3.2.8/build-scripts/pkg-support/mingw/INSTALL.md.in b/contrib/SDL-3.2.8/build-scripts/pkg-support/mingw/INSTALL.md.in new file mode 100644 index 0000000..f1a6a78 --- /dev/null +++ b/contrib/SDL-3.2.8/build-scripts/pkg-support/mingw/INSTALL.md.in | |||
| @@ -0,0 +1,53 @@ | |||
| 1 | |||
| 2 | # Using this package | ||
| 3 | |||
| 4 | This package contains @<@PROJECT_NAME@>@ built for the mingw-w64 toolchain. | ||
| 5 | |||
| 6 | The files for 32-bit architecture are in i686-w64-mingw32 | ||
| 7 | The files for 64-bit architecture are in x86_64-w64-mingw32 | ||
| 8 | |||
| 9 | You can install them to another location, just type `make` for help. | ||
| 10 | |||
| 11 | To use this package, point your include path at _arch_/include and your library path at _arch_/lib, link with the @<@PROJECT_NAME@>@ library and copy _arch_/bin/@<@PROJECT_NAME@>@.dll next to your executable. | ||
| 12 | |||
| 13 | e.g. | ||
| 14 | ```sh | ||
| 15 | gcc -o hello.exe hello.c -Ix86_64-w64-mingw32/include -Lx86_64-w64-mingw32/lib -l@<@PROJECT_NAME@>@ | ||
| 16 | cp x86_64-w64-mingw32/bin/@<@PROJECT_NAME@>@.dll . | ||
| 17 | ./hello.exe | ||
| 18 | ``` | ||
| 19 | |||
| 20 | # Documentation | ||
| 21 | |||
| 22 | An API reference, tutorials, and additional documentation is available at: | ||
| 23 | |||
| 24 | https://wiki.libsdl.org/@<@PROJECT_NAME@>@ | ||
| 25 | |||
| 26 | # Example code | ||
| 27 | |||
| 28 | There are simple example programs available at: | ||
| 29 | |||
| 30 | https://examples.libsdl.org/SDL3 | ||
| 31 | |||
| 32 | # Discussions | ||
| 33 | |||
| 34 | ## Discord | ||
| 35 | |||
| 36 | You can join the official Discord server at: | ||
| 37 | |||
| 38 | https://discord.com/invite/BwpFGBWsv8 | ||
| 39 | |||
| 40 | ## Forums/mailing lists | ||
| 41 | |||
| 42 | You can join SDL development discussions at: | ||
| 43 | |||
| 44 | https://discourse.libsdl.org/ | ||
| 45 | |||
| 46 | Once you sign up, you can use the forum through the website or as a mailing list from your email client. | ||
| 47 | |||
| 48 | ## Announcement list | ||
| 49 | |||
| 50 | You can sign up for the low traffic announcement list at: | ||
| 51 | |||
| 52 | https://www.libsdl.org/mailing-list.php | ||
| 53 | |||
diff --git a/contrib/SDL-3.2.8/build-scripts/pkg-support/mingw/Makefile b/contrib/SDL-3.2.8/build-scripts/pkg-support/mingw/Makefile new file mode 100644 index 0000000..9b6cd55 --- /dev/null +++ b/contrib/SDL-3.2.8/build-scripts/pkg-support/mingw/Makefile | |||
| @@ -0,0 +1,39 @@ | |||
| 1 | # | ||
| 2 | # Makefile for installing the mingw32 version of the SDL library | ||
| 3 | |||
| 4 | DESTDIR = /usr/local | ||
| 5 | ARCHITECTURES := i686-w64-mingw32 x86_64-w64-mingw32 | ||
| 6 | |||
| 7 | default: | ||
| 8 | @echo "Run \"make install-i686\" to install 32-bit" | ||
| 9 | @echo "Run \"make install-x86_64\" to install 64-bit" | ||
| 10 | @echo "Run \"make install-all\" to install both" | ||
| 11 | @echo "Add DESTDIR=/custom/path to change the destination folder" | ||
| 12 | |||
| 13 | install: | ||
| 14 | @if test -d $(ARCH) && test -d $(DESTDIR); then \ | ||
| 15 | (cd $(ARCH) && cp -rv bin include lib share $(DESTDIR)/); \ | ||
| 16 | else \ | ||
| 17 | echo "*** ERROR: $(ARCH) or $(DESTDIR) does not exist!"; \ | ||
| 18 | exit 1; \ | ||
| 19 | fi | ||
| 20 | |||
| 21 | install-i686: | ||
| 22 | $(MAKE) install ARCH=i686-w64-mingw32 | ||
| 23 | |||
| 24 | install-x86_64: | ||
| 25 | $(MAKE) install ARCH=x86_64-w64-mingw32 | ||
| 26 | |||
| 27 | install-all: | ||
| 28 | @if test -d $(DESTDIR); then \ | ||
| 29 | mkdir -p $(DESTDIR)/cmake; \ | ||
| 30 | cp -rv cmake/* $(DESTDIR)/cmake; \ | ||
| 31 | for arch in $(ARCHITECTURES); do \ | ||
| 32 | $(MAKE) install ARCH=$$arch DESTDIR=$(DESTDIR)/$$arch; \ | ||
| 33 | done \ | ||
| 34 | else \ | ||
| 35 | echo "*** ERROR: $(DESTDIR) does not exist!"; \ | ||
| 36 | exit 1; \ | ||
| 37 | fi | ||
| 38 | |||
| 39 | .PHONY: default install install-i686 install-x86_64 install-all | ||
diff --git a/contrib/SDL-3.2.8/build-scripts/pkg-support/msvc/Directory.Build.props b/contrib/SDL-3.2.8/build-scripts/pkg-support/msvc/Directory.Build.props new file mode 100644 index 0000000..24033f4 --- /dev/null +++ b/contrib/SDL-3.2.8/build-scripts/pkg-support/msvc/Directory.Build.props | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
| 3 | <ItemDefinitionGroup> | ||
| 4 | <ClCompile> | ||
| 5 | <PreprocessorDefinitions>SDL_VENDOR_INFO="libsdl.org";%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
| 6 | </ClCompile> | ||
| 7 | </ItemDefinitionGroup> | ||
| 8 | </Project> | ||
diff --git a/contrib/SDL-3.2.8/build-scripts/pkg-support/msvc/INSTALL.md.in b/contrib/SDL-3.2.8/build-scripts/pkg-support/msvc/INSTALL.md.in new file mode 100644 index 0000000..671f524 --- /dev/null +++ b/contrib/SDL-3.2.8/build-scripts/pkg-support/msvc/INSTALL.md.in | |||
| @@ -0,0 +1,45 @@ | |||
| 1 | |||
| 2 | # Using this package | ||
| 3 | |||
| 4 | This package contains @<@PROJECT_NAME@>@ built for Visual Studio. | ||
| 5 | |||
| 6 | To use this package, edit your project properties: | ||
| 7 | - Add the include directory to "VC++ Directories" -> "Include Directories" | ||
| 8 | - Add the lib/_arch_ directory to "VC++ Directories" -> "Library Directories" | ||
| 9 | - Add @<@PROJECT_NAME@>@.lib to Linker -> Input -> "Additional Dependencies" | ||
| 10 | - Copy lib/_arch_/@<@PROJECT_NAME@>@.dll to your project directory. | ||
| 11 | |||
| 12 | # Documentation | ||
| 13 | |||
| 14 | An API reference, tutorials, and additional documentation is available at: | ||
| 15 | |||
| 16 | https://wiki.libsdl.org/@<@PROJECT_NAME@>@ | ||
| 17 | |||
| 18 | # Example code | ||
| 19 | |||
| 20 | There are simple example programs available at: | ||
| 21 | |||
| 22 | https://examples.libsdl.org/SDL3 | ||
| 23 | |||
| 24 | # Discussions | ||
| 25 | |||
| 26 | ## Discord | ||
| 27 | |||
| 28 | You can join the official Discord server at: | ||
| 29 | |||
| 30 | https://discord.com/invite/BwpFGBWsv8 | ||
| 31 | |||
| 32 | ## Forums/mailing lists | ||
| 33 | |||
| 34 | You can join SDL development discussions at: | ||
| 35 | |||
| 36 | https://discourse.libsdl.org/ | ||
| 37 | |||
| 38 | Once you sign up, you can use the forum through the website or as a mailing list from your email client. | ||
| 39 | |||
| 40 | ## Announcement list | ||
| 41 | |||
| 42 | You can sign up for the low traffic announcement list at: | ||
| 43 | |||
| 44 | https://www.libsdl.org/mailing-list.php | ||
| 45 | |||
diff --git a/contrib/SDL-3.2.8/build-scripts/pkg-support/msvc/arm64/INSTALL.md.in b/contrib/SDL-3.2.8/build-scripts/pkg-support/msvc/arm64/INSTALL.md.in new file mode 100644 index 0000000..c185171 --- /dev/null +++ b/contrib/SDL-3.2.8/build-scripts/pkg-support/msvc/arm64/INSTALL.md.in | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | |||
| 2 | # Using this package | ||
| 3 | |||
| 4 | This package contains @<@PROJECT_NAME@>@ built for arm64 Windows. | ||
| 5 | |||
| 6 | To use this package, simply replace an existing 64-bit ARM @<@PROJECT_NAME@>@.dll with the one included here. | ||
| 7 | |||
| 8 | # Development packages | ||
| 9 | |||
| 10 | If you're looking for packages with headers and libraries, you can download one of these: | ||
| 11 | - @<@PROJECT_NAME@>@-devel-@<@PROJECT_VERSION@>@-VC.zip, for development using Visual Studio | ||
| 12 | - @<@PROJECT_NAME@>@-devel-@<@PROJECT_VERSION@>@-mingw.zip, for development using mingw-w64 | ||
| 13 | |||
diff --git a/contrib/SDL-3.2.8/build-scripts/pkg-support/msvc/cmake/SDL3Config.cmake.in b/contrib/SDL-3.2.8/build-scripts/pkg-support/msvc/cmake/SDL3Config.cmake.in new file mode 100644 index 0000000..6387376 --- /dev/null +++ b/contrib/SDL-3.2.8/build-scripts/pkg-support/msvc/cmake/SDL3Config.cmake.in | |||
| @@ -0,0 +1,135 @@ | |||
| 1 | # @<@PROJECT_NAME@>@ CMake configuration file: | ||
| 2 | # This file is meant to be placed in a cmake subfolder of @<@PROJECT_NAME@>@-devel-@<@PROJECT_VERSION@>@-VC.zip | ||
| 3 | |||
| 4 | cmake_minimum_required(VERSION 3.0...3.28) | ||
| 5 | |||
| 6 | include(FeatureSummary) | ||
| 7 | set_package_properties(SDL3 PROPERTIES | ||
| 8 | URL "https://www.libsdl.org/" | ||
| 9 | DESCRIPTION "low level access to audio, keyboard, mouse, joystick, and graphics hardware" | ||
| 10 | ) | ||
| 11 | |||
| 12 | # Copied from `configure_package_config_file` | ||
| 13 | macro(set_and_check _var _file) | ||
| 14 | set(${_var} "${_file}") | ||
| 15 | if(NOT EXISTS "${_file}") | ||
| 16 | message(FATAL_ERROR "File or directory ${_file} referenced by variable ${_var} does not exist !") | ||
| 17 | endif() | ||
| 18 | endmacro() | ||
| 19 | |||
| 20 | # Copied from `configure_package_config_file` | ||
| 21 | macro(check_required_components _NAME) | ||
| 22 | foreach(comp ${${_NAME}_FIND_COMPONENTS}) | ||
| 23 | if(NOT ${_NAME}_${comp}_FOUND) | ||
| 24 | if(${_NAME}_FIND_REQUIRED_${comp}) | ||
| 25 | set(${_NAME}_FOUND FALSE) | ||
| 26 | endif() | ||
| 27 | endif() | ||
| 28 | endforeach() | ||
| 29 | endmacro() | ||
| 30 | |||
| 31 | set(SDL3_FOUND TRUE) | ||
| 32 | |||
| 33 | if(SDL_CPU_X86) | ||
| 34 | set(_sdl_arch_subdir "x86") | ||
| 35 | elseif(SDL_CPU_X64 OR SDL_CPU_ARM64EC) | ||
| 36 | set(_sdl_arch_subdir "x64") | ||
| 37 | elseif(SDL_CPU_ARM64) | ||
| 38 | set(_sdl_arch_subdir "arm64") | ||
| 39 | else() | ||
| 40 | set(SDL3_FOUND FALSE) | ||
| 41 | return() | ||
| 42 | endif() | ||
| 43 | |||
| 44 | get_filename_component(_sdl3_prefix "${CMAKE_CURRENT_LIST_DIR}/.." ABSOLUTE) | ||
| 45 | set_and_check(_sdl3_prefix "${_sdl3_prefix}") | ||
| 46 | set(_sdl3_include_dirs "${_sdl3_prefix}/include") | ||
| 47 | |||
| 48 | set(_sdl3_implib "${_sdl3_prefix}/lib/${_sdl_arch_subdir}/SDL3.lib") | ||
| 49 | set(_sdl3_dll "${_sdl3_prefix}/lib/${_sdl_arch_subdir}/SDL3.dll") | ||
| 50 | set(_sdl3test_lib "${_sdl3_prefix}/lib/${_sdl_arch_subdir}/SDL3_test.lib") | ||
| 51 | |||
| 52 | unset(_sdl_arch_subdir) | ||
| 53 | unset(_sdl3_prefix) | ||
| 54 | |||
| 55 | # All targets are created, even when some might not be requested though COMPONENTS. | ||
| 56 | # This is done for compatibility with CMake generated SDL3-target.cmake files. | ||
| 57 | |||
| 58 | if(NOT TARGET SDL3::Headers) | ||
| 59 | add_library(SDL3::Headers INTERFACE IMPORTED) | ||
| 60 | set_target_properties(SDL3::Headers | ||
| 61 | PROPERTIES | ||
| 62 | INTERFACE_INCLUDE_DIRECTORIES "${_sdl3_include_dirs}" | ||
| 63 | ) | ||
| 64 | endif() | ||
| 65 | set(SDL3_Headers_FOUND TRUE) | ||
| 66 | unset(_sdl3_include_dirs) | ||
| 67 | |||
| 68 | if(EXISTS "${_sdl3_implib}" AND EXISTS "${_sdl3_dll}") | ||
| 69 | if(NOT TARGET SDL3::SDL3-shared) | ||
| 70 | add_library(SDL3::SDL3-shared SHARED IMPORTED) | ||
| 71 | set_target_properties(SDL3::SDL3-shared | ||
| 72 | PROPERTIES | ||
| 73 | INTERFACE_LINK_LIBRARIES "SDL3::Headers" | ||
| 74 | IMPORTED_IMPLIB "${_sdl3_implib}" | ||
| 75 | IMPORTED_LOCATION "${_sdl3_dll}" | ||
| 76 | COMPATIBLE_INTERFACE_BOOL "SDL3_SHARED" | ||
| 77 | INTERFACE_SDL3_SHARED "ON" | ||
| 78 | COMPATIBLE_INTERFACE_STRING "SDL_VERSION" | ||
| 79 | INTERFACE_SDL_VERSION "SDL3" | ||
| 80 | ) | ||
| 81 | endif() | ||
| 82 | set(SDL3_SDL3-shared_FOUND TRUE) | ||
| 83 | else() | ||
| 84 | set(SDL3_SDL3-shared_FOUND FALSE) | ||
| 85 | endif() | ||
| 86 | unset(_sdl3_implib) | ||
| 87 | unset(_sdl3_dll) | ||
| 88 | |||
| 89 | set(SDL3_SDL3-static_FOUND FALSE) | ||
| 90 | |||
| 91 | if(EXISTS "${_sdl3test_lib}") | ||
| 92 | if(NOT TARGET SDL3::SDL3_test) | ||
| 93 | add_library(SDL3::SDL3_test STATIC IMPORTED) | ||
| 94 | set_target_properties(SDL3::SDL3_test | ||
| 95 | PROPERTIES | ||
| 96 | INTERFACE_LINK_LIBRARIES "SDL3::Headers" | ||
| 97 | IMPORTED_LOCATION "${_sdl3test_lib}" | ||
| 98 | COMPATIBLE_INTERFACE_STRING "SDL_VERSION" | ||
| 99 | INTERFACE_SDL_VERSION "SDL3" | ||
| 100 | ) | ||
| 101 | endif() | ||
| 102 | set(SDL3_SDL3_test_FOUND TRUE) | ||
| 103 | else() | ||
| 104 | set(SDL3_SDL3_test_FOUND FALSE) | ||
| 105 | endif() | ||
| 106 | unset(_sdl3test_lib) | ||
| 107 | |||
| 108 | if(SDL3_SDL3-shared_FOUND OR SDL3_SDL3-static_FOUND) | ||
| 109 | set(SDL3_SDL3_FOUND TRUE) | ||
| 110 | endif() | ||
| 111 | |||
| 112 | function(_sdl_create_target_alias_compat NEW_TARGET TARGET) | ||
| 113 | if(CMAKE_VERSION VERSION_LESS "3.18") | ||
| 114 | # Aliasing local targets is not supported on CMake < 3.18, so make it global. | ||
| 115 | add_library(${NEW_TARGET} INTERFACE IMPORTED) | ||
| 116 | set_target_properties(${NEW_TARGET} PROPERTIES INTERFACE_LINK_LIBRARIES "${TARGET}") | ||
| 117 | else() | ||
| 118 | add_library(${NEW_TARGET} ALIAS ${TARGET}) | ||
| 119 | endif() | ||
| 120 | endfunction() | ||
| 121 | |||
| 122 | # Make sure SDL3::SDL3 always exists | ||
| 123 | if(NOT TARGET SDL3::SDL3) | ||
| 124 | if(TARGET SDL3::SDL3-shared) | ||
| 125 | _sdl_create_target_alias_compat(SDL3::SDL3 SDL3::SDL3-shared) | ||
| 126 | endif() | ||
| 127 | endif() | ||
| 128 | |||
| 129 | check_required_components(SDL3) | ||
| 130 | |||
| 131 | set(SDL3_LIBRARIES SDL3::SDL3) | ||
| 132 | set(SDL3_STATIC_LIBRARIES SDL3::SDL3-static) | ||
| 133 | set(SDL3_STATIC_PRIVATE_LIBS) | ||
| 134 | |||
| 135 | set(SDL3TEST_LIBRARY SDL3::SDL3_test) | ||
diff --git a/contrib/SDL-3.2.8/build-scripts/pkg-support/msvc/cmake/SDL3ConfigVersion.cmake.in b/contrib/SDL-3.2.8/build-scripts/pkg-support/msvc/cmake/SDL3ConfigVersion.cmake.in new file mode 100644 index 0000000..82b6af0 --- /dev/null +++ b/contrib/SDL-3.2.8/build-scripts/pkg-support/msvc/cmake/SDL3ConfigVersion.cmake.in | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | # @<@PROJECT_NAME@>@ CMake version configuration file: | ||
| 2 | # This file is meant to be placed in a cmake subfolder of @<@PROJECT_NAME@>@-devel-@<@PROJECT_VERSION@>@-VC.zip | ||
| 3 | |||
| 4 | set(PACKAGE_VERSION "@<@PROJECT_VERSION@>@") | ||
| 5 | |||
| 6 | if(PACKAGE_FIND_VERSION_RANGE) | ||
| 7 | # Package version must be in the requested version range | ||
| 8 | if ((PACKAGE_FIND_VERSION_RANGE_MIN STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION_MIN) | ||
| 9 | OR ((PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_GREATER PACKAGE_FIND_VERSION_MAX) | ||
| 10 | OR (PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE" AND PACKAGE_VERSION VERSION_GREATER_EQUAL PACKAGE_FIND_VERSION_MAX))) | ||
| 11 | set(PACKAGE_VERSION_COMPATIBLE FALSE) | ||
| 12 | else() | ||
| 13 | set(PACKAGE_VERSION_COMPATIBLE TRUE) | ||
| 14 | endif() | ||
| 15 | else() | ||
| 16 | if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION) | ||
| 17 | set(PACKAGE_VERSION_COMPATIBLE FALSE) | ||
| 18 | else() | ||
| 19 | set(PACKAGE_VERSION_COMPATIBLE TRUE) | ||
| 20 | if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION) | ||
| 21 | set(PACKAGE_VERSION_EXACT TRUE) | ||
| 22 | endif() | ||
| 23 | endif() | ||
| 24 | endif() | ||
| 25 | |||
| 26 | # if the using project doesn't have CMAKE_SIZEOF_VOID_P set, fail. | ||
| 27 | if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "") | ||
| 28 | set(PACKAGE_VERSION_UNSUITABLE TRUE) | ||
| 29 | endif() | ||
| 30 | |||
| 31 | include("${CMAKE_CURRENT_LIST_DIR}/sdlcpu.cmake") | ||
| 32 | SDL_DetectTargetCPUArchitectures(_detected_archs) | ||
| 33 | |||
| 34 | # check that the installed version has a compatible architecture as the one which is currently searching: | ||
| 35 | if(NOT(SDL_CPU_X86 OR SDL_CPU_X64 OR SDL_CPU_ARM64 OR SDL_CPU_ARM64EC)) | ||
| 36 | set(PACKAGE_VERSION "${PACKAGE_VERSION} (X86,X64,ARM64)") | ||
| 37 | set(PACKAGE_VERSION_UNSUITABLE TRUE) | ||
| 38 | endif() | ||
diff --git a/contrib/SDL-3.2.8/build-scripts/pkg-support/msvc/x64/INSTALL.md.in b/contrib/SDL-3.2.8/build-scripts/pkg-support/msvc/x64/INSTALL.md.in new file mode 100644 index 0000000..74cd678 --- /dev/null +++ b/contrib/SDL-3.2.8/build-scripts/pkg-support/msvc/x64/INSTALL.md.in | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | |||
| 2 | # Using this package | ||
| 3 | |||
| 4 | This package contains @<@PROJECT_NAME@>@ built for x64 Windows. | ||
| 5 | |||
| 6 | To use this package, simply replace an existing 64-bit @<@PROJECT_NAME@>@.dll with the one included here. | ||
| 7 | |||
| 8 | # Development packages | ||
| 9 | |||
| 10 | If you're looking for packages with headers and libraries, you can download one of these: | ||
| 11 | - @<@PROJECT_NAME@>@-devel-@<@PROJECT_VERSION@>@-VC.zip, for development using Visual Studio | ||
| 12 | - @<@PROJECT_NAME@>@-devel-@<@PROJECT_VERSION@>@-mingw.zip, for development using mingw-w64 | ||
| 13 | |||
diff --git a/contrib/SDL-3.2.8/build-scripts/pkg-support/msvc/x86/INSTALL.md.in b/contrib/SDL-3.2.8/build-scripts/pkg-support/msvc/x86/INSTALL.md.in new file mode 100644 index 0000000..041c116 --- /dev/null +++ b/contrib/SDL-3.2.8/build-scripts/pkg-support/msvc/x86/INSTALL.md.in | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | |||
| 2 | # Using this package | ||
| 3 | |||
| 4 | This package contains @<@PROJECT_NAME@>@ built for x86 Windows. | ||
| 5 | |||
| 6 | To use this package, simply replace an existing 32-bit @<@PROJECT_NAME@>@.dll with the one included here. | ||
| 7 | |||
| 8 | # Development packages | ||
| 9 | |||
| 10 | If you're looking for packages with headers and libraries, you can download one of these: | ||
| 11 | - @<@PROJECT_NAME@>@-devel-@<@PROJECT_VERSION@>@-VC.zip, for development using Visual Studio | ||
| 12 | - @<@PROJECT_NAME@>@-devel-@<@PROJECT_VERSION@>@-mingw.zip, for development using mingw-w64 | ||
| 13 | |||
diff --git a/contrib/SDL-3.2.8/build-scripts/pkg-support/source/SDL_revision.h.cmake.in b/contrib/SDL-3.2.8/build-scripts/pkg-support/source/SDL_revision.h.cmake.in new file mode 100644 index 0000000..99e9f80 --- /dev/null +++ b/contrib/SDL-3.2.8/build-scripts/pkg-support/source/SDL_revision.h.cmake.in | |||
| @@ -0,0 +1,41 @@ | |||
| 1 | /* | ||
| 2 | Simple DirectMedia Layer | ||
| 3 | Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org> | ||
| 4 | |||
| 5 | This software is provided 'as-is', without any express or implied | ||
| 6 | warranty. In no event will the authors be held liable for any damages | ||
| 7 | arising from the use of this software. | ||
| 8 | |||
| 9 | Permission is granted to anyone to use this software for any purpose, | ||
| 10 | including commercial applications, and to alter it and redistribute it | ||
| 11 | freely, subject to the following restrictions: | ||
| 12 | |||
| 13 | 1. The origin of this software must not be misrepresented; you must not | ||
| 14 | claim that you wrote the original software. If you use this software | ||
| 15 | in a product, an acknowledgment in the product documentation would be | ||
| 16 | appreciated but is not required. | ||
| 17 | 2. Altered source versions must be plainly marked as such, and must not be | ||
| 18 | misrepresented as being the original software. | ||
| 19 | 3. This notice may not be removed or altered from any source distribution. | ||
| 20 | */ | ||
| 21 | |||
| 22 | /* WIKI CATEGORY: Version */ | ||
| 23 | |||
| 24 | /* | ||
| 25 | * SDL_revision.h contains the SDL revision, which might be defined on the | ||
| 26 | * compiler command line, or generated right into the header itself by the | ||
| 27 | * build system. | ||
| 28 | */ | ||
| 29 | |||
| 30 | #ifndef SDL_revision_h_ | ||
| 31 | #define SDL_revision_h_ | ||
| 32 | |||
| 33 | #cmakedefine SDL_VENDOR_INFO "@SDL_VENDOR_INFO@" | ||
| 34 | |||
| 35 | #if defined(SDL_VENDOR_INFO) | ||
| 36 | #define SDL_REVISION "@<@PROJECT_REVISION@>@ (" SDL_VENDOR_INFO ")" | ||
| 37 | #else | ||
| 38 | #define SDL_REVISION "@<@PROJECT_REVISION@>@" | ||
| 39 | #endif | ||
| 40 | |||
| 41 | #endif /* SDL_revision_h_ */ | ||
diff --git a/contrib/SDL-3.2.8/build-scripts/pkg-support/source/SDL_revision.h.in b/contrib/SDL-3.2.8/build-scripts/pkg-support/source/SDL_revision.h.in new file mode 100644 index 0000000..7dd6bc1 --- /dev/null +++ b/contrib/SDL-3.2.8/build-scripts/pkg-support/source/SDL_revision.h.in | |||
| @@ -0,0 +1,56 @@ | |||
| 1 | /* | ||
| 2 | Simple DirectMedia Layer | ||
| 3 | Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org> | ||
| 4 | |||
| 5 | This software is provided 'as-is', without any express or implied | ||
| 6 | warranty. In no event will the authors be held liable for any damages | ||
| 7 | arising from the use of this software. | ||
| 8 | |||
| 9 | Permission is granted to anyone to use this software for any purpose, | ||
| 10 | including commercial applications, and to alter it and redistribute it | ||
| 11 | freely, subject to the following restrictions: | ||
| 12 | |||
| 13 | 1. The origin of this software must not be misrepresented; you must not | ||
| 14 | claim that you wrote the original software. If you use this software | ||
| 15 | in a product, an acknowledgment in the product documentation would be | ||
| 16 | appreciated but is not required. | ||
| 17 | 2. Altered source versions must be plainly marked as such, and must not be | ||
| 18 | misrepresented as being the original software. | ||
| 19 | 3. This notice may not be removed or altered from any source distribution. | ||
| 20 | */ | ||
| 21 | |||
| 22 | /* WIKI CATEGORY: Version */ | ||
| 23 | |||
| 24 | /* | ||
| 25 | * SDL_revision.h contains the SDL revision, which might be defined on the | ||
| 26 | * compiler command line, or generated right into the header itself by the | ||
| 27 | * build system. | ||
| 28 | */ | ||
| 29 | |||
| 30 | #ifndef SDL_revision_h_ | ||
| 31 | #define SDL_revision_h_ | ||
| 32 | |||
| 33 | #ifdef SDL_WIKI_DOCUMENTATION_SECTION | ||
| 34 | |||
| 35 | /** | ||
| 36 | * This macro is a string describing the source at a particular point in | ||
| 37 | * development. | ||
| 38 | * | ||
| 39 | * This string is often generated from revision control's state at build time. | ||
| 40 | * | ||
| 41 | * This string can be quite complex and does not follow any standard. For | ||
| 42 | * example, it might be something like "SDL-prerelease-3.1.1-47-gf687e0732". | ||
| 43 | * It might also be user-defined at build time, so it's best to treat it as a | ||
| 44 | * clue in debugging forensics and not something the app will parse in any | ||
| 45 | * way. | ||
| 46 | * | ||
| 47 | * \since This macro is available since SDL 3.0.0. | ||
| 48 | */ | ||
| 49 | #define SDL_REVISION "Some arbitrary string decided at SDL build time" | ||
| 50 | #elif defined(SDL_VENDOR_INFO) | ||
| 51 | #define SDL_REVISION "@<@PROJECT_REVISION@>@ (" SDL_VENDOR_INFO ")" | ||
| 52 | #else | ||
| 53 | #define SDL_REVISION "@<@PROJECT_REVISION@>@" | ||
| 54 | #endif | ||
| 55 | |||
| 56 | #endif /* SDL_revision_h_ */ | ||
