From 41a62f0249c2f42c03026f57b0be5a5d0c1d4f04 Mon Sep 17 00:00:00 2001 From: "K.Ohta" Date: Mon, 26 Aug 2019 23:14:09 +0900 Subject: [PATCH] [Qt][HOMEBREW] Fix not detected SDL at configuration of Qt::Gamepad. --- .../tool/cross-build/Qt5.12/config_sample.5.12.sh | 1 + source/tool/cross-build/Qt5.12/make_cross.sh | 2 +- .../000_qtgamepad_config.test.mingw32.patch | 24 ++++++++++++++++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 source/tool/cross-build/Qt5.12/patches/000_qtgamepad_config.test.mingw32.patch diff --git a/source/tool/cross-build/Qt5.12/config_sample.5.12.sh b/source/tool/cross-build/Qt5.12/config_sample.5.12.sh index 416e9bdab..7f4d5ef6d 100755 --- a/source/tool/cross-build/Qt5.12/config_sample.5.12.sh +++ b/source/tool/cross-build/Qt5.12/config_sample.5.12.sh @@ -47,6 +47,7 @@ export PKG_CONFIG_SYSROOT_DIR=/usr/local/i586-mingw-msvc/pkgconfig -L $VULKAN_SDK/lib \ -device-option SDL_PREFIX=$SDK_PREFIX/SDL/i686-w64-mingw32 \ -device-option SDL2_PREFIX=$SDK_PREFIX/SDL/i686-w64-mingw32 \ + -device-option LIBS_SDL2+=SDLmain \ -device-option ICU_PREFIX=$SDK_PREFIX/icu \ -device-option OPENGL_ES2_PREFIX=$SDK_PREFIX/Angle \ -device-option VULKAN_PREFIX=$VULKAN_SDK \ diff --git a/source/tool/cross-build/Qt5.12/make_cross.sh b/source/tool/cross-build/Qt5.12/make_cross.sh index 7a72b7a71..573a18e7e 100755 --- a/source/tool/cross-build/Qt5.12/make_cross.sh +++ b/source/tool/cross-build/Qt5.12/make_cross.sh @@ -7,4 +7,4 @@ export PATH="$PATH:\ " export PKG_CONFIG_LIBDIR=/usr/i686-w64-mingw32/lib -make CROSS_COMPILE=i686-w64-mingw32- PKG_CONFIG_LIBDIR=/usr/i686-w64-mingw32/lib $@ 2>&1 +taskset 0xfbe make CROSS_COMPILE=i686-w64-mingw32- PKG_CONFIG_LIBDIR=/usr/i686-w64-mingw32/lib $@ 2>&1 diff --git a/source/tool/cross-build/Qt5.12/patches/000_qtgamepad_config.test.mingw32.patch b/source/tool/cross-build/Qt5.12/patches/000_qtgamepad_config.test.mingw32.patch new file mode 100644 index 000000000..9ea113a69 --- /dev/null +++ b/source/tool/cross-build/Qt5.12/patches/000_qtgamepad_config.test.mingw32.patch @@ -0,0 +1,24 @@ +--- main.cpp.orig 2019-08-26 22:51:44.229281866 +0900 ++++ main.cpp 2019-08-26 22:56:32.169706856 +0900 +@@ -34,6 +34,8 @@ + ** + ****************************************************************************/ + ++#include ++#include + #include + #include + +@@ -43,3 +45,12 @@ + SDL_Quit(); + return 0; + } ++ ++int WINAPI WinMain( ++ HINSTANCE hCurInst, ++ HINSTANCE hPrevInst, ++ LPSTR lpsCmdLine, ++ int nCmdShow) ++{ ++ return main(0, NULL); ++} -- 2.11.0