From 6dc91df3956b86556326b02b994fbf87e7413770 Mon Sep 17 00:00:00 2001 From: Hugues Delorme Date: Tue, 6 Feb 2024 17:53:32 +0100 Subject: [PATCH] CI: WIP build for arm --- mayo.pro | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/mayo.pro b/mayo.pro index 3ea18848..60b0a0b5 100644 --- a/mayo.pro +++ b/mayo.pro @@ -19,14 +19,8 @@ message(Qt version $$QT_VERSION) error(Qt >= 5.14 is required but detected version is $$QT_VERSION) } -# Check architecture -equals(QT_ARCH, x86_64) { - # NOP -} else:equals(QT_ARCH, i386) { - # NOP -} else { - warning(Platform architecture may be not supported(QT_ARCH = $$QT_ARCH)) -} +# If variable 'CHECK_ARCH_64' is not empty then host is 64bit +CHECK_ARCH_64 = $$find(QT_ARCH, 64) QT += core gui widgets greaterThan(QT_MAJOR_VERSION, 5) { @@ -60,22 +54,35 @@ msvc { DEFINES += _USE_MATH_DEFINES } } + gcc|clang { QMAKE_CXXFLAGS += -std=c++17 } + clang { # Silent Clang warnings about instantiation of variable 'Mayo::GenericProperty::TypeName' QMAKE_CXXFLAGS += -Wno-undefined-var-template # See https://libcxx.llvm.org/docs/UsingLibcxx.html # LIBS += -lstdc++fs } + +unix:!macx { + isEmpty(CHECK_ARCH_64) { + DEFINES += _FILE_OFFSET_BITS=64 _LARGEFILE64_SOURCE=1 + } +} + macx { DEFINES += GL_SILENCE_DEPRECATION + isEmpty(CHECK_ARCH_64) { + DEFINES += _DARWIN_USE_64_BIT_INODE + } QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.15 LIBS += -liconv # QMAKE_CXXFLAGS += -mmacosx-version-min=10.15 ICON = images/appicon.icns } + win32 { LIBS += -lOpengl32 -lUser32 }