ppsspp/Qt/Settings.pri

86 lines
2.9 KiB
Plaintext
Raw Normal View History

2015-10-12 17:57:19 +00:00
VERSION = 1.1.1.0
DEFINES += USING_QT_UI USE_FFMPEG
exists( /usr/include/snappy-c.h ) {
DEFINES += SHARED_SNAPPY
}
unix:contains(QT_CONFIG, system-zlib) {
DEFINES += SHARED_ZLIB
}
exists( /usr/include/zip.h ) {
DEFINES += SHARED_LIBZIP
}
# Global specific
win32:CONFIG(release, debug|release): CONFIG_DIR = $$join(OUT_PWD,,,/release)
else:win32:CONFIG(debug, debug|release): CONFIG_DIR = $$join(OUT_PWD,,,/debug)
else:CONFIG_DIR=$$OUT_PWD
OBJECTS_DIR = $$CONFIG_DIR/.obj/$$TARGET
MOC_DIR = $$CONFIG_DIR/.moc/$$TARGET
UI_DIR = $$CONFIG_DIR/.ui/$$TARGET
2014-07-24 06:34:46 +00:00
RCC_DIR = $$CONFIG_DIR/.rcc/$$TARGET
QMAKE_CLEAN += -r $$OBJECTS_DIR $$MOC_DIR $$UI_DIR $$RCC_DIR
P = $$_PRO_FILE_PWD_/..
INCLUDEPATH += $$P/Common
win32|contains(QT_CONFIG, no-zlib): INCLUDEPATH += $$P/ext/zlib
# Work out arch name
include(Platform/ArchDetection.pri)
# Work out platform name
include(Platform/OSDetection.pri)
# OS dependent paths
!system_ffmpeg: INCLUDEPATH += $$P/ffmpeg/$${PLATFORM_NAME}/$${PLATFORM_ARCH}/include
!contains(CONFIG, staticlib) {
QMAKE_LIBDIR += $$CONFIG_DIR
!system_ffmpeg: QMAKE_LIBDIR += $$P/ffmpeg/$${PLATFORM_NAME}/$${PLATFORM_ARCH}/lib/
2014-07-25 04:41:52 +00:00
contains(DEFINES, USE_FFMPEG): LIBS+= -lavformat -lavcodec -lavutil -lswresample -lswscale
2014-07-08 19:22:56 +00:00
equals(PLATFORM_NAME, "linux"):arm|android: LIBS += -lEGL
}
# Work out the git version in a way that works on every QMake
symbian {
exists($$P/.git): GIT_VERSION = $$system(git describe --always)
isEmpty(GIT_VERSION): GIT_VERSION = $$VERSION
} else {
# QMake seems to change how it handles quotes with every version. This works for most systems:
exists($$P/.git): GIT_VERSION = '\\"$$system(git describe --always)\\"'
isEmpty(GIT_VERSION): GIT_VERSION = '\\"$$VERSION\\"'
}
DEFINES += PPSSPP_GIT_VERSION=\"$$GIT_VERSION\"
2013-11-24 17:03:16 +00:00
# Optimisations
win32-msvc* {
2014-06-10 17:10:50 +00:00
DEFINES += _MBCS GLEW_STATIC _CRT_SECURE_NO_WARNINGS "_VARIADIC_MAX=10"
contains(DEFINES, UNICODE): DEFINES += _UNICODE
QMAKE_ALLFLAGS_RELEASE += /O2 /fp:fast
} else {
DEFINES += __STDC_CONSTANT_MACROS
2014-07-24 06:34:46 +00:00
QMAKE_CXXFLAGS += -Wno-unused-function -Wno-unused-variable -Wno-strict-aliasing -fno-strict-aliasing -Wno-unused-parameter -Wno-multichar -Wno-uninitialized -Wno-ignored-qualifiers -Wno-missing-field-initializers
2014-06-03 07:30:37 +00:00
greaterThan(QT_MAJOR_VERSION,4): CONFIG+=c++11
2014-06-10 17:10:50 +00:00
else: QMAKE_CXXFLAGS += -std=c++11
QMAKE_CFLAGS_RELEASE ~= s/-O.*/
QMAKE_CXXFLAGS_RELEASE ~= s/-O.*/
2014-07-24 06:34:46 +00:00
QMAKE_ALLFLAGS_RELEASE += -O3 -ffast-math
}
contains(QT_CONFIG, opengles.) {
DEFINES += USING_GLES2
# How else do we know if the environment prefers windows?
!equals(PLATFORM_NAME, "linux")|android|maemo {
CONFIG += mobile_platform
}
2013-02-26 19:03:56 +00:00
}
mobile_platform: DEFINES += MOBILE_DEVICE
# Handle flags for both C and C++
QMAKE_CFLAGS += $$QMAKE_ALLFLAGS
QMAKE_CXXFLAGS += $$QMAKE_ALLFLAGS
QMAKE_CFLAGS_DEBUG += $$QMAKE_ALLFLAGS_DEBUG
QMAKE_CXXFLAGS_DEBUG += $$QMAKE_ALLFLAGS_DEBUG
QMAKE_CFLAGS_RELEASE += $$QMAKE_ALLFLAGS_RELEASE
QMAKE_CXXFLAGS_RELEASE += $$QMAKE_ALLFLAGS_RELEASE