1#-------------------------------------------------
2#
3# Project created by QtCreator 2015-07-14T20:08:14
4#
5#-------------------------------------------------
6
7# File with common stuff for whole project
8include(../../../common.pri)
9
10# Library work with xml.
11QT       += xml xmlpatterns printsupport
12
13# We don't need gui library.
14QT       -= gui
15
16# Name of the library
17TARGET = vformat
18
19# We want create a library
20TEMPLATE = lib
21
22CONFIG += staticlib # Making static library
23
24# Since Q5.12 available support for C++17
25equals(QT_MAJOR_VERSION, 5):greaterThan(QT_MINOR_VERSION, 11) {
26    CONFIG += c++17
27} else {
28    CONFIG += c++14
29}
30
31# Use out-of-source builds (shadow builds)
32CONFIG -= debug_and_release debug_and_release_target
33
34# The following define makes your compiler emit warnings if you use
35# any feature of Qt which has been marked as deprecated (the exact warnings
36# depend on your compiler). Please consult the documentation of the
37# deprecated API in order to know how to port your code away from it.
38DEFINES += QT_DEPRECATED_WARNINGS
39
40# You can also make your code fail to compile if you use deprecated APIs.
41# In order to do so, uncomment the following line.
42# You can also select to disable deprecated APIs only up to a certain version of Qt.
43#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
44
45# Since Qt 5.4.0 the source code location is recorded only in debug builds.
46# We need this information also in release builds. For this need define QT_MESSAGELOGCONTEXT.
47DEFINES += QT_MESSAGELOGCONTEXT
48
49include(vformat.pri)
50
51# This is static library so no need in "make install"
52
53# directory for executable file
54DESTDIR = bin
55
56# files created moc
57MOC_DIR = moc
58
59# objecs files
60OBJECTS_DIR = obj
61
62# Set using ccache. Function enable_ccache() defined in common.pri.
63$$enable_ccache()
64
65include(warnings.pri)
66
67CONFIG(release, debug|release){
68    # Release mode
69    !*msvc*:CONFIG += silent
70    DEFINES += V_NO_ASSERT
71    !unix:*g++*{
72        QMAKE_CXXFLAGS += -fno-omit-frame-pointer # Need for exchndl.dll
73    }
74
75    noDebugSymbols{ # For enable run qmake with CONFIG+=noDebugSymbols
76        # do nothing
77    } else {
78        !macx:!*msvc*{
79            # Turn on debug symbols in release mode on Unix systems.
80            # On Mac OS X temporarily disabled. TODO: find way how to strip binary file.
81            QMAKE_CXXFLAGS_RELEASE += -g -gdwarf-3
82            QMAKE_CFLAGS_RELEASE += -g -gdwarf-3
83            QMAKE_LFLAGS_RELEASE =
84        }
85    }
86}
87
88include (../libs.pri)
89