Switch to SDL3+SDL2-compat
This commit is contained in:
parent
d4d4ab5b06
commit
9813932c1b
3 changed files with 25 additions and 20 deletions
21
app/app.pro
21
app/app.pro
|
|
@ -36,17 +36,13 @@ DEFINES += QT_DEPRECATED_WARNINGS
|
||||||
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
||||||
|
|
||||||
win32 {
|
win32 {
|
||||||
contains(QT_ARCH, i386) {
|
|
||||||
LIBS += -L$$PWD/../libs/windows/lib/x86
|
|
||||||
INCLUDEPATH += $$PWD/../libs/windows/include/x86
|
|
||||||
}
|
|
||||||
contains(QT_ARCH, x86_64) {
|
contains(QT_ARCH, x86_64) {
|
||||||
LIBS += -L$$PWD/../libs/windows/lib/x64
|
LIBS += -L$$PWD/../libs/windows/lib/x64
|
||||||
INCLUDEPATH += $$PWD/../libs/windows/include/x64
|
INCLUDEPATH += $$PWD/../libs/windows/include/x64 $$PWD/../libs/windows/include/x64/SDL2
|
||||||
}
|
}
|
||||||
contains(QT_ARCH, arm64) {
|
contains(QT_ARCH, arm64) {
|
||||||
LIBS += -L$$PWD/../libs/windows/lib/arm64
|
LIBS += -L$$PWD/../libs/windows/lib/arm64
|
||||||
INCLUDEPATH += $$PWD/../libs/windows/include/arm64
|
INCLUDEPATH += $$PWD/../libs/windows/include/arm64 $$PWD/../libs/windows/include/arm64/SDL2
|
||||||
}
|
}
|
||||||
|
|
||||||
INCLUDEPATH += $$PWD/../libs/windows/include
|
INCLUDEPATH += $$PWD/../libs/windows/include
|
||||||
|
|
@ -56,15 +52,8 @@ win32 {
|
||||||
DEFINES += _USE_MATH_DEFINES
|
DEFINES += _USE_MATH_DEFINES
|
||||||
}
|
}
|
||||||
macx:!disable-prebuilts {
|
macx:!disable-prebuilts {
|
||||||
INCLUDEPATH += $$PWD/../libs/mac/include
|
INCLUDEPATH += $$PWD/../libs/mac/include $$PWD/../libs/mac/include/SDL2
|
||||||
INCLUDEPATH += $$PWD/../libs/mac/Frameworks/SDL2.framework/Versions/A/Headers
|
LIBS += -L$$PWD/../libs/mac/lib
|
||||||
INCLUDEPATH += $$PWD/../libs/mac/Frameworks/SDL2_ttf.framework/Versions/A/Headers
|
|
||||||
LIBS += -L$$PWD/../libs/mac/lib -F$$PWD/../libs/mac/Frameworks
|
|
||||||
|
|
||||||
# QMake doesn't handle framework-style includes correctly on its own
|
|
||||||
QMAKE_CFLAGS += -F$$PWD/../libs/mac/Frameworks
|
|
||||||
QMAKE_CXXFLAGS += -F$$PWD/../libs/mac/Frameworks
|
|
||||||
QMAKE_OBJECTIVE_CFLAGS += -F$$PWD/../libs/mac/Frameworks
|
|
||||||
}
|
}
|
||||||
|
|
||||||
unix:if(!macx|disable-prebuilts) {
|
unix:if(!macx|disable-prebuilts) {
|
||||||
|
|
@ -163,7 +152,7 @@ win32:!winrt {
|
||||||
}
|
}
|
||||||
macx {
|
macx {
|
||||||
!disable-prebuilts {
|
!disable-prebuilts {
|
||||||
LIBS += -lssl.3 -lcrypto.3 -lavcodec.62 -lavutil.60 -lswscale.9 -lopus -framework SDL2 -framework SDL2_ttf
|
LIBS += -lssl.3 -lcrypto.3 -lavcodec.62 -lavutil.60 -lswscale.9 -lopus -lSDL2 -lSDL2_ttf
|
||||||
CONFIG += discord-rpc
|
CONFIG += discord-rpc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
2
libs
2
libs
|
|
@ -1 +1 @@
|
||||||
Subproject commit a13c11c7d2fdd05978b83800bb53a77955804881
|
Subproject commit 6a5f6036d1aa5515d75753c24e6488615f6aa22e
|
||||||
|
|
@ -4,15 +4,31 @@ while [[ "$#" -gt 0 ]]; do
|
||||||
echo $1
|
echo $1
|
||||||
case "$1" in
|
case "$1" in
|
||||||
--sdl2_win)
|
--sdl2_win)
|
||||||
rm $LIB_PATH/windows/include/*/begin_code.h $LIB_PATH/windows/include/*/close_code.h $LIB_PATH/windows/include/*/SDL*.h $LIB_PATH/windows/lib/*/SDL2.* $LIB_PATH/windows/lib/*/SDL2main.*
|
rm -r $LIB_PATH/windows/include/*/SDL2
|
||||||
|
rm $LIB_PATH/windows/lib/*/SDL2.* $LIB_PATH/windows/lib/*/SDL2main.*
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
--sdl2_mac)
|
--sdl2_mac)
|
||||||
rm -r $LIB_PATH/mac/Frameworks/SDL2.framework
|
rm -r $LIB_PATH/mac/include/SDL2
|
||||||
|
rm $LIB_PATH/mac/lib/libSDL2.dylib
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
--sdl3_win)
|
||||||
|
rm -r $LIB_PATH/windows/include/*/SDL3
|
||||||
|
rm $LIB_PATH/windows/lib/*/SDL3.* $LIB_PATH/windows/lib/*/SDL3main.*
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
--sdl3_mac)
|
||||||
|
rm -r $LIB_PATH/mac/include/SDL3
|
||||||
|
rm $LIB_PATH/mac/lib/libSDL3.dylib
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
--sdl_ttf_win)
|
--sdl_ttf_win)
|
||||||
rm $LIB_PATH/windows/include/SDL_ttf.h $LIB_PATH/windows/lib/*/SDL2_ttf.*
|
rm $LIB_PATH/windows/include/*/SDL2/SDL_ttf.h $LIB_PATH/windows/lib/*/SDL2_ttf.*
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
--sdl_ttf_mac)
|
||||||
|
rm $LIB_PATH/mac/include/SDL2/SDL_ttf.h $LIB_PATH/mac/lib/libSDL2_ttf.dylib
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
--detours_win)
|
--detours_win)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue