1#------------------------------------------------- 2# 3# Project created by QtCreator 2014-08-26T14:18:08 4# 5#------------------------------------------------- 6 7# File with common stuff for whole project 8include(../../../common.pri) 9 10# Library use widgets 11QT += core widgets 12 13# We don't need gui library. 14QT -= gui 15 16# Name of library 17TARGET = vpropertyexplorer 18 19# We want create library 20TEMPLATE = lib 21 22# Since Q5.12 available support for C++17 23equals(QT_MAJOR_VERSION, 5):greaterThan(QT_MINOR_VERSION, 11) { 24 CONFIG += c++17 25} else { 26 CONFIG += c++14 27} 28 29# The following define makes your compiler emit warnings if you use 30# any feature of Qt which has been marked as deprecated (the exact warnings 31# depend on your compiler). Please consult the documentation of the 32# deprecated API in order to know how to port your code away from it. 33DEFINES += QT_DEPRECATED_WARNINGS 34 35# You can also make your code fail to compile if you use deprecated APIs. 36# In order to do so, uncomment the following line. 37# You can also select to disable deprecated APIs only up to a certain version of Qt. 38#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 39 40# Since Qt 5.4.0 the source code location is recorded only in debug builds. 41# We need this information also in release builds. For this need define QT_MESSAGELOGCONTEXT. 42DEFINES += QT_MESSAGELOGCONTEXT 43 44DEFINES += VPROPERTYEXPLORER_LIBRARY 45 46# directory for executable file 47DESTDIR = bin 48 49# files created moc 50MOC_DIR = moc 51 52# objecs files 53OBJECTS_DIR = obj 54 55# Allow MAC OS X to find library inside a bundle 56macx:QMAKE_SONAME_PREFIX = @rpath 57 58include(vpropertyexplorer.pri) 59 60# Set "make install" command for Unix-like systems. 61unix:!macx{ 62 isEmpty(PREFIX_LIB){ 63 isEmpty(PREFIX){ 64 PR_LIB = $$DEFAULT_PREFIX 65 } else { 66 PR_LIB = $$PREFIX 67 } 68 contains(QMAKE_HOST.arch, x86_64) { 69 PREFIX_LIB = $$PR_LIB/lib 70 } else { 71 PREFIX_LIB = $$PR_LIB/lib 72 } 73 } 74 target.path = $$PREFIX_LIB 75 INSTALLS += target 76} 77 78# Set using ccache. Function enable_ccache() defined in common.pri. 79$$enable_ccache() 80 81include(warnings.pri) 82 83CONFIG(release, debug|release){ 84 # Release mode 85 !*msvc*:CONFIG += silent 86 87 !unix:*g++*{ 88 QMAKE_CXXFLAGS += -fno-omit-frame-pointer # Need for exchndl.dll 89 } 90 91 checkWarnings{ 92 unix:include(warnings.pri) 93 } 94 95 noStripDebugSymbols { 96 # do nothing 97 } else { 98 !macx:!*msvc*{ 99 noDebugSymbols{ # For enable run qmake with CONFIG+=noDebugSymbols 100 # Strip debug symbols. 101 QMAKE_POST_LINK += objcopy --strip-debug bin/${TARGET} 102 } else { 103 # Turn on debug symbols in release mode on Unix systems. 104 # On Mac OS X temporarily disabled. TODO: find way how to strip binary file. 105 QMAKE_CXXFLAGS_RELEASE += -g -gdwarf-3 106 QMAKE_CFLAGS_RELEASE += -g -gdwarf-3 107 QMAKE_LFLAGS_RELEASE = 108 109 # Strip debug symbols. 110 QMAKE_POST_LINK += objcopy --only-keep-debug bin/${TARGET} bin/${TARGET}.dbg && 111 QMAKE_POST_LINK += objcopy --strip-debug bin/${TARGET} && 112 QMAKE_POST_LINK += objcopy --add-gnu-debuglink="bin/${TARGET}.dbg" bin/${TARGET} 113 114 QMAKE_DISTCLEAN += bin/${TARGET}.dbg 115 } 116 } 117 } 118} 119 120include (../libs.pri) 121