mirror of https://github.com/encounter/SDL.git
Merge commit '4ca5ea5b7e8333b2cde1b7cdddf167c67cc3f23c' into main
This commit is contained in:
commit
9c7b9e08b3
|
@ -38,6 +38,7 @@ jobs:
|
||||||
-DANDROID_PLATFORM=${{ matrix.platform.android_platform }} \
|
-DANDROID_PLATFORM=${{ matrix.platform.android_platform }} \
|
||||||
-DANDROID_ABI=${{ matrix.platform.android_abi }} \
|
-DANDROID_ABI=${{ matrix.platform.android_abi }} \
|
||||||
-DSDL_STATIC_PIC=ON \
|
-DSDL_STATIC_PIC=ON \
|
||||||
|
-DSDL_VENDOR_INFO="Github Workflow" \
|
||||||
-DCMAKE_INSTALL_PREFIX=prefix \
|
-DCMAKE_INSTALL_PREFIX=prefix \
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
-GNinja
|
-GNinja
|
||||||
|
|
|
@ -33,6 +33,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
emcmake cmake -S cmake/test -B cmake_config_build \
|
emcmake cmake -S cmake/test -B cmake_config_build \
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
|
-DSDL_VENDOR_INFO="Github Workflow" \
|
||||||
-DTEST_SHARED=FALSE \
|
-DTEST_SHARED=FALSE \
|
||||||
-DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }}
|
-DCMAKE_PREFIX_PATH=${{ env.SDL2_DIR }}
|
||||||
cmake --build cmake_config_build --verbose
|
cmake --build cmake_config_build --verbose
|
||||||
|
|
|
@ -72,6 +72,7 @@ jobs:
|
||||||
-DSDL_TESTS=ON \
|
-DSDL_TESTS=ON \
|
||||||
-DSDL_WERROR=ON \
|
-DSDL_WERROR=ON \
|
||||||
-DSDL_INSTALL_TESTS=ON \
|
-DSDL_INSTALL_TESTS=ON \
|
||||||
|
-DSDL_VENDOR_INFO="Github Workflow" \
|
||||||
-DCMAKE_INSTALL_PREFIX=cmake_prefix \
|
-DCMAKE_INSTALL_PREFIX=cmake_prefix \
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
${{ matrix.platform.cmake }}
|
${{ matrix.platform.cmake }}
|
||||||
|
@ -102,6 +103,7 @@ jobs:
|
||||||
(
|
(
|
||||||
cd build-autotools
|
cd build-autotools
|
||||||
${{ github.workspace }}/configure \
|
${{ github.workspace }}/configure \
|
||||||
|
--enable-vendor-info="Github Workflow" \
|
||||||
--enable-werror \
|
--enable-werror \
|
||||||
--prefix=${{ github.workspace }}/autotools_prefix \
|
--prefix=${{ github.workspace }}/autotools_prefix \
|
||||||
)
|
)
|
||||||
|
|
|
@ -43,6 +43,7 @@ jobs:
|
||||||
-DSDL_WERROR=${{ !matrix.platform.nowerror }} `
|
-DSDL_WERROR=${{ !matrix.platform.nowerror }} `
|
||||||
-DSDL_TESTS=ON `
|
-DSDL_TESTS=ON `
|
||||||
-DSDL_INSTALL_TESTS=ON `
|
-DSDL_INSTALL_TESTS=ON `
|
||||||
|
-DSDL_VENDOR_INFO="Github Workflow" `
|
||||||
-DSDL2_DISABLE_INSTALL=OFF `
|
-DSDL2_DISABLE_INSTALL=OFF `
|
||||||
${{ matrix.platform.flags }} `
|
${{ matrix.platform.flags }} `
|
||||||
-DCMAKE_INSTALL_PREFIX=prefix
|
-DCMAKE_INSTALL_PREFIX=prefix
|
||||||
|
|
|
@ -20,6 +20,7 @@ jobs:
|
||||||
-DSDL_WERROR=ON \
|
-DSDL_WERROR=ON \
|
||||||
-DSDL_TESTS=ON \
|
-DSDL_TESTS=ON \
|
||||||
-DSDL_INSTALL_TESTS=ON \
|
-DSDL_INSTALL_TESTS=ON \
|
||||||
|
-DSDL_VENDOR_INFO="Github Workflow" \
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
-DCMAKE_INSTALL_PREFIX=prefix
|
-DCMAKE_INSTALL_PREFIX=prefix
|
||||||
- name: Build
|
- name: Build
|
||||||
|
|
|
@ -46,6 +46,7 @@ jobs:
|
||||||
-DSDL_GCC_ATOMICS=OFF \
|
-DSDL_GCC_ATOMICS=OFF \
|
||||||
-DSDL_TESTS=ON \
|
-DSDL_TESTS=ON \
|
||||||
-DSDL_INSTALL_TESTS=ON \
|
-DSDL_INSTALL_TESTS=ON \
|
||||||
|
-DSDL_VENDOR_INFO="Github Workflow" \
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/prefix_cmake
|
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/prefix_cmake
|
||||||
- name: Build (CMake)
|
- name: Build (CMake)
|
||||||
|
|
|
@ -510,6 +510,7 @@ dep_option(SDL_HIDAPI_LIBUSB "Use libusb for low level joystick drivers" O
|
||||||
dep_option(SDL_HIDAPI_JOYSTICK "Use HIDAPI for low level joystick drivers" ON SDL_HIDAPI 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)
|
dep_option(SDL_VIRTUAL_JOYSTICK "Enable the virtual-joystick driver" ON SDL_HIDAPI OFF)
|
||||||
set_option(SDL_ASAN "Use AddressSanitizer to detect memory errors" OFF)
|
set_option(SDL_ASAN "Use AddressSanitizer to detect memory errors" OFF)
|
||||||
|
option_string(SDL_VENDOR_INFO "Vendor name and/or version to add to SDL_REVISION" "")
|
||||||
|
|
||||||
option(SDL_WERROR "Enable -Werror" OFF)
|
option(SDL_WERROR "Enable -Werror" OFF)
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,7 @@ RANLIB = @RANLIB@
|
||||||
RC = @RC@
|
RC = @RC@
|
||||||
LINKER = @LINKER@
|
LINKER = @LINKER@
|
||||||
LIBTOOLLINKERTAG = @LIBTOOLLINKERTAG@
|
LIBTOOLLINKERTAG = @LIBTOOLLINKERTAG@
|
||||||
|
SDL_VENDOR_INFO = @SDL_VENDOR_INFO@
|
||||||
|
|
||||||
TARGET = libSDL2.la
|
TARGET = libSDL2.la
|
||||||
OBJECTS = @OBJECTS@
|
OBJECTS = @OBJECTS@
|
||||||
|
@ -152,7 +153,7 @@ $(objects)/.created:
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
update-revision:
|
update-revision:
|
||||||
$(SHELL) $(auxdir)/updaterev.sh
|
$(SHELL) $(auxdir)/updaterev.sh --vendor "$(SDL_VENDOR_INFO)"
|
||||||
|
|
||||||
.PHONY: all update-revision install install-bin install-hdrs install-lib install-data uninstall uninstall-bin uninstall-hdrs uninstall-lib uninstall-data clean distclean dist $(OBJECTS:.lo=.d)
|
.PHONY: all update-revision install install-bin install-hdrs install-lib install-data uninstall uninstall-bin uninstall-hdrs uninstall-lib uninstall-data clean distclean dist $(OBJECTS:.lo=.d)
|
||||||
|
|
||||||
|
@ -252,6 +253,7 @@ dist $(distfile):
|
||||||
-name '.#*' \) \
|
-name '.#*' \) \
|
||||||
-exec rm -f {} \;
|
-exec rm -f {} \;
|
||||||
if test -f $(distdir)/test/Makefile; then (cd $(distdir)/test && make distclean); fi
|
if test -f $(distdir)/test/Makefile; then (cd $(distdir)/test && make distclean); fi
|
||||||
|
# Intentionally no vendor suffix: that's a property of the build, not the source
|
||||||
(cd $(distdir); $(srcdir)/build-scripts/updaterev.sh --dist)
|
(cd $(distdir); $(srcdir)/build-scripts/updaterev.sh --dist)
|
||||||
tar cvf - $(distdir) | gzip --best >$(distfile)
|
tar cvf - $(distdir) | gzip --best >$(distfile)
|
||||||
rm -rf $(distdir)
|
rm -rf $(distdir)
|
||||||
|
|
|
@ -7,6 +7,7 @@ cd `dirname $0`
|
||||||
srcdir=..
|
srcdir=..
|
||||||
header=$outdir/include/SDL_revision.h
|
header=$outdir/include/SDL_revision.h
|
||||||
dist=
|
dist=
|
||||||
|
vendor=
|
||||||
|
|
||||||
while [ "$#" -gt 0 ]; do
|
while [ "$#" -gt 0 ]; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
|
@ -14,6 +15,10 @@ while [ "$#" -gt 0 ]; do
|
||||||
dist=yes
|
dist=yes
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
(--vendor)
|
||||||
|
vendor="$2"
|
||||||
|
shift 2
|
||||||
|
;;
|
||||||
(*)
|
(*)
|
||||||
echo "$0: Unknown option: $1" >&2
|
echo "$0: Unknown option: $1" >&2
|
||||||
exit 2
|
exit 2
|
||||||
|
@ -27,7 +32,14 @@ if [ "$rev" != "" ]; then
|
||||||
echo "$rev" > "$outdir/VERSION"
|
echo "$rev" > "$outdir/VERSION"
|
||||||
fi
|
fi
|
||||||
echo "/* Generated by updaterev.sh, do not edit */" >"$header.new"
|
echo "/* Generated by updaterev.sh, do not edit */" >"$header.new"
|
||||||
|
if [ -n "$vendor" ]; then
|
||||||
|
echo "#define SDL_VENDOR_INFO \"$vendor\"" >>"$header.new"
|
||||||
|
fi
|
||||||
|
echo "#ifdef SDL_VENDOR_INFO" >>"$header.new"
|
||||||
|
echo "#define SDL_REVISION \"SDL-$rev (\" SDL_VENDOR_INFO \")\"" >>"$header.new"
|
||||||
|
echo "#else" >>"$header.new"
|
||||||
echo "#define SDL_REVISION \"SDL-$rev\"" >>"$header.new"
|
echo "#define SDL_REVISION \"SDL-$rev\"" >>"$header.new"
|
||||||
|
echo "#endif" >>"$header.new"
|
||||||
echo "#define SDL_REVISION_NUMBER 0" >>"$header.new"
|
echo "#define SDL_REVISION_NUMBER 0" >>"$header.new"
|
||||||
if diff $header $header.new >/dev/null 2>&1; then
|
if diff $header $header.new >/dev/null 2>&1; then
|
||||||
rm "$header.new"
|
rm "$header.new"
|
||||||
|
|
|
@ -4684,6 +4684,12 @@ else
|
||||||
fi
|
fi
|
||||||
AC_SUBST([INSTALL_SDL2_CONFIG], [$enable_sdl2_config])
|
AC_SUBST([INSTALL_SDL2_CONFIG], [$enable_sdl2_config])
|
||||||
|
|
||||||
|
AC_ARG_ENABLE([vendor-info],
|
||||||
|
[AS_HELP_STRING([--enable-vendor-info=STRING], [Add vendor info to SDL_REVISION])],
|
||||||
|
[enable_vendor_info="$enableval"], [enable_vendor_info=])
|
||||||
|
AS_IF([test "$enable_vendor_info" = no], [enable_vendor_info=])
|
||||||
|
AC_SUBST([SDL_VENDOR_INFO], [$enable_vendor_info])
|
||||||
|
|
||||||
# Verify that we have all the platform specific files we need
|
# Verify that we have all the platform specific files we need
|
||||||
|
|
||||||
if test x$have_audio != xyes; then
|
if test x$have_audio != xyes; then
|
||||||
|
|
|
@ -1,2 +1,6 @@
|
||||||
|
#ifdef SDL_VENDOR_INFO
|
||||||
|
#define SDL_REVISION SDL_VENDOR_INFO
|
||||||
|
#else
|
||||||
#define SDL_REVISION ""
|
#define SDL_REVISION ""
|
||||||
|
#endif
|
||||||
#define SDL_REVISION_NUMBER 0
|
#define SDL_REVISION_NUMBER 0
|
||||||
|
|
|
@ -1,2 +1,8 @@
|
||||||
#define SDL_REVISION "@SDL_REVISION@"
|
#cmakedefine SDL_VENDOR_INFO "@SDL_VENDOR_INFO@"
|
||||||
#define SDL_REVISION_NUMBER 0
|
#define SDL_REVISION_NUMBER 0
|
||||||
|
|
||||||
|
#ifdef SDL_VENDOR_INFO
|
||||||
|
#define SDL_REVISION "@SDL_REVISION@ (" SDL_VENDOR_INFO ")"
|
||||||
|
#else
|
||||||
|
#define SDL_REVISION "@SDL_REVISION@"
|
||||||
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue