From a9dfbebb97166b97d48f1bdb7b6e9edbfa98bf1e Mon Sep 17 00:00:00 2001 From: cjee21 <77721854+cjee21@users.noreply.github.com> Date: Mon, 2 Dec 2024 22:02:00 +0800 Subject: [PATCH] Qt GUI: Add Windows ARM64 build --- Project/QMake/GUI/MediaInfoQt.pro | 32 +++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/Project/QMake/GUI/MediaInfoQt.pro b/Project/QMake/GUI/MediaInfoQt.pro index 2f38ae425..b221ff45e 100644 --- a/Project/QMake/GUI/MediaInfoQt.pro +++ b/Project/QMake/GUI/MediaInfoQt.pro @@ -66,6 +66,9 @@ unix { } win32 { + QMAKE_CXXFLAGS += /guard:cf + QMAKE_LFLAGS += /guard:cf /CETCOMPAT + contains(UWP, yes|1) { WINRT_ASSETS_PATH=../../../Source/Resource/Image/Assets @@ -189,9 +192,34 @@ win32 { QMAKE_CXXFLAGS += /guard:ehcont QMAKE_LFLAGS += /guard:ehcont } + + contains(QT_ARCH, arm64) { + exists(../../../../MediaInfoLib/Project/MSVC2022/ARM64/Release/MediaInfo-Static.lib) { + INCLUDEPATH += ../../../../MediaInfoLib/Source + LIBS += $$PWD/../../../../MediaInfoLib/Project/MSVC2022/ARM64/Release/MediaInfo-Static.lib + } else { + error("libmediainfo not found on system") + } + + exists(../../../../ZenLib/Project/MSVC2022/ARM64/Release/ZenLib.lib) { + INCLUDEPATH += ../../../../ZenLib/Source + LIBS += $$PWD/../../../../ZenLib/Project/MSVC2022/ARM64/Release/ZenLib.lib + } else { + error("libzen not found on system") + } + + exists(../../../../zlib/contrib/vstudio/vc17/ARM64/Release/zlibstat.lib) { + INCLUDEPATH += ../../../../zlib + LIBS += $$PWD/../../../../zlib/contrib/vstudio/vc17/ARM64/Release/zlibstat.lib + } else { + error("zlib not found on system") + } + + QMAKE_CXXFLAGS += /guard:ehcont /guard:signret + QMAKE_LFLAGS += /guard:ehcont /guard:delayloadsignret + QMAKE_LFLAGS -= /CETCOMPAT + } } - QMAKE_CXXFLAGS += /guard:cf - QMAKE_LFLAGS += /guard:cf /CETCOMPAT } INCLUDEPATH += _Automated \