2014-04-25 14:58:14 +02:00
|
|
|
#-------------------------------------------------
|
|
|
|
#
|
|
|
|
# Project created by QtCreator 2014-04-25T12:01:49
|
|
|
|
#
|
|
|
|
#-------------------------------------------------
|
|
|
|
|
2014-10-27 15:29:31 +01:00
|
|
|
# File with common stuff for whole project
|
|
|
|
include(../../../Valentina.pri)
|
|
|
|
|
|
|
|
# We don't need gui library.
|
2014-04-25 14:58:14 +02:00
|
|
|
QT -= gui
|
|
|
|
|
2014-10-27 15:29:31 +01:00
|
|
|
# Name of library
|
2014-04-25 14:58:14 +02:00
|
|
|
TARGET = qmuparser
|
2014-10-27 15:29:31 +01:00
|
|
|
|
|
|
|
# We want create library
|
2014-04-25 14:58:14 +02:00
|
|
|
TEMPLATE = lib
|
|
|
|
|
2014-10-27 15:29:31 +01:00
|
|
|
# Use out-of-source builds (shadow builds)
|
2014-04-25 14:58:14 +02:00
|
|
|
CONFIG -= debug_and_release debug_and_release_target
|
2014-10-27 15:29:31 +01:00
|
|
|
|
|
|
|
# We use C++11 standard
|
2014-04-25 14:58:14 +02:00
|
|
|
CONFIG += c++11
|
|
|
|
|
|
|
|
DEFINES += QMUPARSER_LIBRARY
|
|
|
|
|
|
|
|
# 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(qmuparser.pri)
|
2014-04-25 14:58:14 +02:00
|
|
|
|
2014-12-04 18:57:22 +01:00
|
|
|
VERSION = 2.2.5
|
2014-04-25 14:58: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-10-27 15:29:31 +01:00
|
|
|
isEmpty(PREFIX){
|
2014-11-20 21:13:05 +01:00
|
|
|
contains(QMAKE_HOST.arch, x86_64) {
|
|
|
|
PREFIX = $$DEFAULT_PREFIX/lib64
|
|
|
|
} else {
|
|
|
|
PREFIX = $$DEFAULT_PREFIX/lib
|
|
|
|
}
|
2014-11-21 13:01:35 +01:00
|
|
|
target.path = $$PREFIX
|
|
|
|
} else {
|
|
|
|
contains(QMAKE_HOST.arch, x86_64) {
|
|
|
|
target.path = $$PREFIX/lib64
|
|
|
|
} else {
|
|
|
|
target.path = $$PREFIX/lib
|
|
|
|
}
|
2014-10-15 18:56:14 +02:00
|
|
|
}
|
2014-10-27 15:29:31 +01:00
|
|
|
|
2014-04-25 14:58:14 +02:00
|
|
|
INSTALLS += target
|
|
|
|
}
|
|
|
|
|
2014-10-27 15:29:31 +01:00
|
|
|
# Set using ccache. Function enable_ccache() defined in Valentina.pri.
|
|
|
|
$$enable_ccache()
|
2014-04-25 14:58:14 +02:00
|
|
|
|
2014-10-27 15:29:31 +01:00
|
|
|
# Set precompiled headers. Function set_PCH() defined in Valentina.pri.
|
|
|
|
$$set_PCH()
|
2014-09-20 18:05:21 +02:00
|
|
|
|
2014-04-25 14:58:14 +02:00
|
|
|
CONFIG(debug, debug|release){
|
2014-10-27 15:29:31 +01:00
|
|
|
# Debug mode
|
2014-04-25 14:58:14 +02:00
|
|
|
unix {
|
2014-10-27 15:29:31 +01:00
|
|
|
#Turn on compilers warnings.
|
2014-04-25 14:58:14 +02:00
|
|
|
*-g++{
|
2014-09-11 18:52:02 +02:00
|
|
|
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}" \
|
2014-10-27 15:29:31 +01:00
|
|
|
$$GCC_DEBUG_CXXFLAGS # See Valentina.pri for more details.
|
2014-04-25 14:58:14 +02:00
|
|
|
}
|
2014-06-04 13:16:16 +02:00
|
|
|
clang*{
|
|
|
|
QMAKE_CXXFLAGS += \
|
2014-10-27 15:29:31 +01:00
|
|
|
# Key -isystem disable checking errors in system headers.
|
2014-06-04 13:16:16 +02:00
|
|
|
-isystem "$${OUT_PWD}/$${MOC_DIR}" \
|
2014-10-27 15:29:31 +01:00
|
|
|
$$CLANG_DEBUG_CXXFLAGS # See Valentina.pri for more details.
|
2014-06-04 13:16:16 +02:00
|
|
|
}
|
2014-04-25 14:58:14 +02:00
|
|
|
} else {
|
2014-10-27 15:29:31 +01:00
|
|
|
*-g++{
|
|
|
|
QMAKE_CXXFLAGS += $$GCC_DEBUG_CXXFLAGS # See Valentina.pri for more details.
|
2014-04-25 14:58:14 +02:00
|
|
|
}
|
|
|
|
}
|
2014-09-11 18:52:02 +02:00
|
|
|
|
2014-04-25 14:58:14 +02:00
|
|
|
}else{
|
2014-10-27 15:29:31 +01:00
|
|
|
# Release mode
|
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*{
|
2014-10-27 15:29:31 +01:00
|
|
|
# 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
|
2014-11-13 13:14:00 +01:00
|
|
|
QMAKE_CFLAGS_RELEASE += -g -gdwarf-3
|
|
|
|
QMAKE_LFLAGS_RELEASE =
|
2014-10-27 15:29:31 +01:00
|
|
|
|
|
|
|
# Strip debug symbols.
|
2014-11-13 13:14:00 +01:00
|
|
|
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}
|
2014-10-04 08:55:52 +02:00
|
|
|
}
|
2014-04-25 14:58:14 +02:00
|
|
|
}
|