2014-08-26 17:06:14 +02:00
|
|
|
|
#-------------------------------------------------
|
|
|
|
|
#
|
|
|
|
|
# Project created by QtCreator 2014-08-26T14:18:08
|
|
|
|
|
#
|
|
|
|
|
#-------------------------------------------------
|
|
|
|
|
|
2014-10-27 15:29:31 +01:00
|
|
|
|
# File with common stuff for whole project
|
2015-07-10 11:28:30 +02:00
|
|
|
|
include(../../../common.pri)
|
2014-10-27 15:29:31 +01:00
|
|
|
|
|
|
|
|
|
# Library use widgets
|
2014-08-26 17:06:14 +02:00
|
|
|
|
QT += widgets
|
|
|
|
|
|
2014-10-27 15:29:31 +01:00
|
|
|
|
# We don't need gui library.
|
2014-08-26 17:06:14 +02:00
|
|
|
|
QT -= gui
|
|
|
|
|
|
2014-10-27 15:29:31 +01:00
|
|
|
|
# Name of library
|
2014-08-26 17:06:14 +02:00
|
|
|
|
TARGET = vpropertyexplorer
|
2014-10-27 15:29:31 +01:00
|
|
|
|
|
|
|
|
|
# We want create library
|
2014-08-26 17:06:14 +02:00
|
|
|
|
TEMPLATE = lib
|
|
|
|
|
|
2014-10-27 15:29:31 +01:00
|
|
|
|
# We use C++11 standard
|
2014-08-26 17:06:14 +02:00
|
|
|
|
CONFIG += c++11
|
|
|
|
|
|
2014-12-31 12:25:22 +01:00
|
|
|
|
# Since Qt 5.4.0 the source code location is recorded only in debug builds.
|
|
|
|
|
# We need this information also in release builds. For this need define QT_MESSAGELOGCONTEXT.
|
|
|
|
|
DEFINES += QT_MESSAGELOGCONTEXT
|
|
|
|
|
|
2014-08-26 17:06:14 +02:00
|
|
|
|
DEFINES += VPROPERTYEXPLORER_LIBRARY
|
|
|
|
|
|
2014-08-26 20:31:28 +02:00
|
|
|
|
# directory for executable file
|
|
|
|
|
DESTDIR = bin
|
|
|
|
|
|
|
|
|
|
# files created moc
|
|
|
|
|
MOC_DIR = moc
|
|
|
|
|
|
|
|
|
|
# objecs files
|
|
|
|
|
OBJECTS_DIR = obj
|
|
|
|
|
|
2014-12-03 15:11:57 +01:00
|
|
|
|
include(vpropertyexplorer.pri)
|
2014-08-26 17:06:14 +02:00
|
|
|
|
|
2014-10-27 15:29:31 +01:00
|
|
|
|
# Set "make install" command for Unix-like systems.
|
2014-11-20 21:13:05 +01:00
|
|
|
|
unix:!macx{
|
2014-12-07 12:31:34 +01:00
|
|
|
|
isEmpty(PREFIX_LIB){
|
2014-12-22 23:13:25 +01:00
|
|
|
|
isEmpty(PREFIX){
|
|
|
|
|
PR_LIB = $$DEFAULT_PREFIX
|
|
|
|
|
} else {
|
|
|
|
|
PR_LIB = $$PREFIX
|
|
|
|
|
}
|
2014-11-20 21:13:05 +01:00
|
|
|
|
contains(QMAKE_HOST.arch, x86_64) {
|
2014-12-22 23:13:25 +01:00
|
|
|
|
PREFIX_LIB = $$PR_LIB/lib64
|
2014-11-20 21:13:05 +01:00
|
|
|
|
} else {
|
2014-12-22 23:13:25 +01:00
|
|
|
|
PREFIX_LIB = $$PR_LIB/lib
|
2014-11-21 13:01:35 +01:00
|
|
|
|
}
|
2014-10-15 18:56:14 +02:00
|
|
|
|
}
|
2014-12-07 12:31:34 +01:00
|
|
|
|
target.path = $$PREFIX_LIB
|
2014-08-26 17:06:14 +02:00
|
|
|
|
INSTALLS += target
|
|
|
|
|
}
|
2014-08-26 20:31:28 +02:00
|
|
|
|
|
2015-07-10 11:28:30 +02:00
|
|
|
|
# Set using ccache. Function enable_ccache() defined in common.pri.
|
2014-10-27 15:29:31 +01:00
|
|
|
|
$$enable_ccache()
|
2014-09-20 18:05:21 +02:00
|
|
|
|
|
2015-07-10 11:28:30 +02:00
|
|
|
|
# Set precompiled headers. Function set_PCH() defined in common.pri.
|
2014-10-27 15:29:31 +01:00
|
|
|
|
$$set_PCH()
|
2014-09-20 18:05:21 +02:00
|
|
|
|
|
2014-09-11 18:52:02 +02:00
|
|
|
|
CONFIG(debug, debug|release){
|
2014-10-27 15:29:31 +01:00
|
|
|
|
# Debug mode
|
2014-09-11 18:52:02 +02:00
|
|
|
|
unix {
|
2014-10-27 15:29:31 +01:00
|
|
|
|
#Turn on compilers warnings.
|
2014-09-11 18:52:02 +02:00
|
|
|
|
*-g++{
|
2015-05-11 09:10:25 +02:00
|
|
|
|
QMAKE_CXXFLAGS += \
|
|
|
|
|
-isystem "$${OUT_PWD}/$${MOC_DIR}" \
|
|
|
|
|
# Key -isystem disable checking errors in system headers.
|
2015-07-10 11:28:30 +02:00
|
|
|
|
$$GCC_DEBUG_CXXFLAGS \ # See common.pri for more details.
|
2015-05-11 09:10:25 +02:00
|
|
|
|
|
|
|
|
|
# -isystem key works only for headers. In some cases it's not enough. But we can't delete this warnings and
|
|
|
|
|
# want them in global list. Compromise decision delete them from local list.
|
|
|
|
|
QMAKE_CXXFLAGS -= \
|
|
|
|
|
-Wswitch-default
|
|
|
|
|
|
2015-05-16 16:17:34 +02:00
|
|
|
|
noAddressSanitizer{ # For enable run qmake with CONFIG+=noAddressSanitizer
|
2015-05-11 09:10:25 +02:00
|
|
|
|
# do nothing
|
|
|
|
|
} else {
|
|
|
|
|
#gcc’s 4.8.0 Address Sanitizer
|
|
|
|
|
#http://blog.qt.digia.com/blog/2013/04/17/using-gccs-4-8-0-address-sanitizer-with-qt/
|
|
|
|
|
QMAKE_CXXFLAGS += -fsanitize=address -fno-omit-frame-pointer
|
|
|
|
|
QMAKE_CFLAGS += -fsanitize=address -fno-omit-frame-pointer
|
|
|
|
|
QMAKE_LFLAGS += -fsanitize=address
|
|
|
|
|
}
|
2014-09-11 18:52:02 +02:00
|
|
|
|
}
|
2015-03-16 13:23:02 +01:00
|
|
|
|
|
2014-09-11 18:52:02 +02:00
|
|
|
|
clang*{
|
|
|
|
|
QMAKE_CXXFLAGS += \
|
2014-10-27 15:29:31 +01:00
|
|
|
|
# Key -isystem disable checking errors in system headers.
|
2014-09-11 18:52:02 +02:00
|
|
|
|
-isystem "$${OUT_PWD}/$${MOC_DIR}" \
|
2015-07-10 11:28:30 +02:00
|
|
|
|
$$CLANG_DEBUG_CXXFLAGS # See common.pri for more details.
|
2015-03-16 13:23:02 +01:00
|
|
|
|
|
|
|
|
|
# -isystem key works only for headers. In some cases it's not enough. But we can't delete this warnings and
|
|
|
|
|
# want them in global list. Compromise decision delete them from local list.
|
|
|
|
|
QMAKE_CXXFLAGS -= \
|
|
|
|
|
-Wundefined-reinterpret-cast
|
2014-09-11 18:52:02 +02:00
|
|
|
|
}
|
|
|
|
|
} else {
|
2014-10-27 15:29:31 +01:00
|
|
|
|
*-g++{
|
2015-07-10 11:28:30 +02:00
|
|
|
|
QMAKE_CXXFLAGS += $$CLANG_DEBUG_CXXFLAGS # See common.pri for more details.
|
2014-09-11 18:52:02 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}else{
|
2014-10-27 15:29:31 +01:00
|
|
|
|
# Release mode
|
2015-10-09 19:22:49 +02:00
|
|
|
|
CONFIG += silent
|
2014-09-24 19:51:06 +02:00
|
|
|
|
|
2014-11-13 13:14:00 +01:00
|
|
|
|
!unix:*-g++{
|
|
|
|
|
QMAKE_CXXFLAGS += -fno-omit-frame-pointer # Need for exchndl.dll
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
!macx:!win32-msvc*{
|
2015-05-16 19:38:05 +02:00
|
|
|
|
noDebugSymbols{ # For enable run qmake with CONFIG+=noDebugSymbols
|
|
|
|
|
# do nothing
|
|
|
|
|
} else {
|
|
|
|
|
# Turn on debug symbols in release mode on Unix systems.
|
|
|
|
|
# On Mac OS X temporarily disabled. TODO: find way how to strip binary file.
|
|
|
|
|
QMAKE_CXXFLAGS_RELEASE += -g -gdwarf-3
|
|
|
|
|
QMAKE_CFLAGS_RELEASE += -g -gdwarf-3
|
|
|
|
|
QMAKE_LFLAGS_RELEASE =
|
|
|
|
|
|
|
|
|
|
noStripDebugSymbols { # For enable run qmake with CONFIG+=noStripDebugSymbols
|
|
|
|
|
# do nothing
|
|
|
|
|
} else {
|
|
|
|
|
# Strip debug symbols.
|
|
|
|
|
QMAKE_POST_LINK += objcopy --only-keep-debug bin/${TARGET} bin/${TARGET}.dbg &&
|
|
|
|
|
QMAKE_POST_LINK += objcopy --strip-debug bin/${TARGET} &&
|
|
|
|
|
QMAKE_POST_LINK += objcopy --add-gnu-debuglink="bin/${TARGET}.dbg" bin/${TARGET}
|
|
|
|
|
}
|
2015-10-11 19:27:47 +02:00
|
|
|
|
|
|
|
|
|
QMAKE_DISTCLEAN += bin/${TARGET}.dbg
|
2015-05-16 19:38:05 +02:00
|
|
|
|
}
|
2014-10-04 08:55:52 +02:00
|
|
|
|
}
|
2014-09-11 18:52:02 +02:00
|
|
|
|
}
|