mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 14:55:36 +08:00
Before this commit, the default memory limit was around 2 GB and our MinGW built executables hit this limit. Swift and all 3rd party libraries are 64 bit safe, so it is also safe to use the large-address-aware linker flag. This allows memory allocation up to 4 GB. refs #788
183 lines
4.5 KiB
Plaintext
183 lines
4.5 KiB
Plaintext
# Copyright (C) 2015
|
|
# swift project Community / Contributors
|
|
#
|
|
# This file is part of swift project. It is subject to the license terms in
|
|
# the LICENSE file found in the top-level directory of this distribution and
|
|
# at http://www.swift-project.org/license.html. No part of swift project,
|
|
# including this file, may be copied, modified, propagated, or distributed
|
|
# except according to the terms contained in the LICENSE file.
|
|
|
|
################################
|
|
# Version number
|
|
################################
|
|
|
|
include(version.pri)
|
|
|
|
!win32 {
|
|
VER_MAJ = $${BLACK_VER_MAJ}
|
|
VER_MIN = $${BLACK_VER_MIN}
|
|
VER_PAT = $${BLACK_VER_PAT}
|
|
VERSION = $${BLACK_VERSION}
|
|
}
|
|
|
|
################################
|
|
# Destination tree
|
|
################################
|
|
|
|
CONFIG(debug, debug|release): DestRoot = $$DestRootDebug
|
|
else: DestRoot = $$DestRootRelease
|
|
|
|
################################
|
|
# Build configuration
|
|
################################
|
|
|
|
include(config.pri)
|
|
|
|
################################
|
|
# QMake options
|
|
################################
|
|
|
|
CONFIG += qt
|
|
CONFIG += warn_on
|
|
CONFIG += c++14
|
|
|
|
################################
|
|
# Detect 32 or 64 bit
|
|
################################
|
|
|
|
include(wordsize.pri)
|
|
|
|
################################
|
|
# Multithreaded build in VS IDE
|
|
################################
|
|
|
|
contains(TEMPLATE, "vc.*"): QMAKE_CXXFLAGS *= /MP
|
|
|
|
################################
|
|
# Profile build
|
|
################################
|
|
|
|
contains(BLACK_CONFIG, ProfileRelease) {
|
|
win32-msvc* {
|
|
QMAKE_CXXFLAGS_RELEASE *= /Zi
|
|
QMAKE_LFLAGS_RELEASE *= /DEBUG /PROFILE /INCREMENTAL:NO /OPT:REF /OPT:ICF
|
|
}
|
|
}
|
|
|
|
# Needed to workaround C1128 error
|
|
# TODO check whether this is still needed after CValueObject refactoring
|
|
win32-msvc*: QMAKE_CXXFLAGS *= /bigobj
|
|
|
|
################################
|
|
# No incremental build
|
|
################################
|
|
|
|
# win32-msvc*:QMAKE_LFLAGS_DEBUG *= /INCREMENTAL:NO
|
|
|
|
################################
|
|
# No gigantic MinGW obj files
|
|
################################
|
|
|
|
win32-g++: QMAKE_CXXFLAGS_DEBUG += -Og
|
|
|
|
################################
|
|
# FSX or FS9 on 32bit Windows only
|
|
################################
|
|
|
|
equals(WORD_SIZE,64)|!win32: BLACK_CONFIG -= FSX FS9
|
|
|
|
################################
|
|
# For BlackMisc::getStackTrace
|
|
################################
|
|
|
|
linux-g++: QMAKE_LFLAGS_DEBUG *= -rdynamic
|
|
|
|
################################
|
|
# Suppress stupid warnings
|
|
################################
|
|
|
|
include(warnings.pri)
|
|
|
|
################################
|
|
# Handle addresses larger than 2GB
|
|
################################
|
|
|
|
win32-g++: QMAKE_LFLAGS *= -Wl,--large-address-aware
|
|
|
|
################################
|
|
# Path to external dependencies
|
|
################################
|
|
|
|
# If you want to manually set the external path, uncomment the following line
|
|
# EXTERNALSROOT = /path/to/externals
|
|
|
|
isEmpty(EXTERNALSROOT) {
|
|
EXTERNALSROOT = $$(SWIFT_EXTERNALS_DIR)
|
|
}
|
|
|
|
isEmpty(EXTERNALSROOT) {
|
|
EXTERNALSROOT = $$SourceRoot/externals
|
|
}
|
|
|
|
!exists("$$EXTERNALSROOT/common/include") {
|
|
error("Could not find externals in $${EXTERNALSROOT}. Please install them!")
|
|
}
|
|
|
|
################################
|
|
# Externals
|
|
################################
|
|
|
|
INCLUDEPATH *= $$EXTERNALSROOT/common/include
|
|
INCLUDEPATH *= $$EXTERNALSROOT/$$basename(QMAKESPEC)/include
|
|
INCLUDEPATH *= $$EXTERNALSROOT/common/include/crashpad
|
|
INCLUDEPATH *= $$EXTERNALSROOT/common/include/mini_chromium
|
|
|
|
equals(WORD_SIZE,64) {
|
|
EXTERNALS_BIN_DIR = $$EXTERNALSROOT/$$basename(QMAKESPEC)/bin64
|
|
EXTERNALS_LIB_DIR = $$EXTERNALSROOT/$$basename(QMAKESPEC)/lib64
|
|
}
|
|
equals(WORD_SIZE,32) {
|
|
EXTERNALS_BIN_DIR = $$EXTERNALSROOT/$$basename(QMAKESPEC)/bin32
|
|
EXTERNALS_LIB_DIR = $$EXTERNALSROOT/$$basename(QMAKESPEC)/lib32
|
|
}
|
|
|
|
LIBS *= -L$$EXTERNALS_LIB_DIR
|
|
macx: LIBS *= -F$$EXTERNALS_LIB_DIR
|
|
win32: LIBS *= -luser32
|
|
|
|
INCLUDEPATH *= $$EXTERNALDIR/common/include
|
|
|
|
################################
|
|
# Includes
|
|
################################
|
|
|
|
INCLUDEPATH *= $$BuildRoot/src
|
|
|
|
################################
|
|
# Platform extensions
|
|
################################
|
|
|
|
isEmpty(QMAKE_EXTENSION_SHLIB) {
|
|
mac|ios: QMAKE_EXTENSION_SHLIB = dylib
|
|
else:win*: QMAKE_EXTENSION_SHLIB = dll
|
|
else: QMAKE_EXTENSION_SHLIB = so
|
|
}
|
|
|
|
isEmpty(QMAKE_EXTENSION_EXE) {
|
|
win32: QMAKE_EXTENSION_EXE = exe
|
|
}
|
|
|
|
################################
|
|
# Install prefix
|
|
################################
|
|
|
|
isEmpty(PREFIX) {
|
|
PREFIX = $$BuildRoot/dist
|
|
}
|
|
|
|
################################
|
|
# Debug Suffix
|
|
################################
|
|
|
|
win32: CONFIG(debug, debug|release): DLL_DEBUG_SUFFIX = d
|