2013-06-20 16:09:50 +02:00
|
|
|
#-------------------------------------------------
|
|
|
|
#
|
|
|
|
# Project created by QtCreator 2013-06-18T12:36:43
|
|
|
|
#
|
|
|
|
#-------------------------------------------------
|
|
|
|
|
2013-08-29 15:12:30 +02:00
|
|
|
# Use out-of-source builds (shadow builds)
|
|
|
|
|
2014-01-19 11:00:20 +01:00
|
|
|
QT += core gui widgets xml svg printsupport xmlpatterns
|
2013-06-20 16:09:50 +02:00
|
|
|
|
|
|
|
TEMPLATE = app
|
|
|
|
|
2013-11-28 17:28:49 +01:00
|
|
|
TARGET = valentina
|
2013-06-20 16:09:50 +02:00
|
|
|
|
2013-11-06 14:34:54 +01:00
|
|
|
CONFIG -= debug_and_release debug_and_release_target
|
2013-11-21 11:03:25 +01:00
|
|
|
CONFIG += c++11
|
2013-06-20 16:09:50 +02:00
|
|
|
|
2013-11-06 14:34:54 +01:00
|
|
|
#DEFINES += ...
|
2013-07-03 14:29:26 +02:00
|
|
|
|
2013-08-29 15:12:30 +02:00
|
|
|
# directory for executable file
|
|
|
|
DESTDIR = bin
|
|
|
|
|
|
|
|
# files created moc
|
2013-12-20 15:47:11 +01:00
|
|
|
MOC_DIR = moc
|
2013-08-29 15:12:30 +02:00
|
|
|
|
|
|
|
# objecs files
|
|
|
|
OBJECTS_DIR = obj
|
|
|
|
|
|
|
|
# files created rcc
|
|
|
|
RCC_DIR = rcc
|
|
|
|
|
|
|
|
# files created uic
|
|
|
|
UI_DIR = uic
|
|
|
|
|
2013-11-21 09:33:11 +01:00
|
|
|
include(src/src.pri)
|
2013-11-20 13:43:48 +01:00
|
|
|
include(src/container/container.pri)
|
|
|
|
include(src/dialogs/dialogs.pri)
|
|
|
|
include(src/exception/exception.pri)
|
|
|
|
include(src/geometry/geometry.pri)
|
|
|
|
include(src/tools/tools.pri)
|
|
|
|
include(src/widgets/widgets.pri)
|
|
|
|
include(src/xml/xml.pri)
|
2013-11-06 14:34:54 +01:00
|
|
|
|
|
|
|
RESOURCES += \
|
2013-11-20 13:43:48 +01:00
|
|
|
share/resources/icon.qrc \
|
2014-01-03 22:02:51 +01:00
|
|
|
share/resources/cursor.qrc \
|
2014-01-19 11:00:20 +01:00
|
|
|
share/resources/theme.qrc \
|
|
|
|
share/resources/schema.qrc
|
2013-08-29 15:12:30 +02:00
|
|
|
|
2013-11-21 09:33:11 +01:00
|
|
|
OTHER_FILES += share/resources/valentina.rc \
|
|
|
|
share/resources/icon/64x64/icon64x64.ico
|
|
|
|
|
2014-01-18 16:04:48 +01:00
|
|
|
TRANSLATIONS += share/translations/valentina.ts \
|
|
|
|
share/translations/valentina_ru.ts \
|
2013-12-20 10:45:19 +01:00
|
|
|
share/translations/valentina_uk.ts \
|
2014-01-19 11:05:07 +01:00
|
|
|
share/translations/valentina_de.ts \
|
2014-02-05 13:31:42 +01:00
|
|
|
share/translations/valentina_cs.ts \
|
|
|
|
share/translations/valentina_he_IL.ts \
|
|
|
|
share/translations/valentina_fr.ts
|
2014-01-18 16:04:48 +01:00
|
|
|
|
2013-12-20 10:45:19 +01:00
|
|
|
unix {
|
|
|
|
QMAKE_CXX = ccache g++
|
|
|
|
}
|
2013-11-21 13:14:25 +01:00
|
|
|
|
2013-11-28 17:28:49 +01:00
|
|
|
CONFIG += precompile_header
|
|
|
|
# Precompiled headers (PCH)
|
|
|
|
PRECOMPILED_HEADER = src/stable.h
|
|
|
|
win32-msvc* {
|
|
|
|
PRECOMPILED_SOURCE = src/stable.cpp
|
|
|
|
}
|
|
|
|
|
2013-07-28 00:18:06 +02:00
|
|
|
CONFIG(debug, debug|release){
|
|
|
|
# Debug
|
2014-01-02 18:35:58 +01:00
|
|
|
unix {
|
|
|
|
*-g++{
|
|
|
|
QMAKE_CXXFLAGS += -isystem "/usr/include/qt5" -isystem "/usr/include/qt5/QtWidgets" \
|
|
|
|
-isystem "/usr/include/qt5/QtXml" -isystem "/usr/include/qt5/QtGui" \
|
|
|
|
-isystem "/usr/include/qt5/QtCore" -isystem "$${UI_DIR}" -isystem "$${MOC_DIR}" \
|
|
|
|
-isystem "$${RCC_DIR}" \
|
2014-01-08 15:05:32 +01:00
|
|
|
-O0 -Wall -Wextra -pedantic -Weffc++ -Woverloaded-virtual -Wctor-dtor-privacy \
|
2014-02-22 17:30:37 +01:00
|
|
|
-Wnon-virtual-dtor -Wold-style-cast -Wconversion -Winit-self -Wstack-protector \
|
2014-01-02 18:35:58 +01:00
|
|
|
-Wunreachable-code -Wcast-align -Wcast-qual -Wdisabled-optimization -Wfloat-equal \
|
2014-02-22 17:30:37 +01:00
|
|
|
-Wformat=2 -Wimport \
|
2014-01-02 18:35:58 +01:00
|
|
|
-Winvalid-pch -Wunsafe-loop-optimizations -Wlong-long -Wmissing-format-attribute \
|
2014-02-22 17:30:37 +01:00
|
|
|
-Wmissing-include-dirs -Wpacked -Wredundant-decls -Winline \
|
|
|
|
-Wswitch-default -Wswitch-enum -Wuninitialized -Wvariadic-macros \
|
|
|
|
-Wlogical-op -Wnoexcept -Wmissing-noreturn -Wpointer-arith\
|
2014-01-02 18:35:58 +01:00
|
|
|
-Wstrict-null-sentinel -Wstrict-overflow=5 -Wundef -Wno-unused -gdwarf-3
|
2014-04-16 17:32:41 +02:00
|
|
|
-ftrapv
|
2014-01-02 18:35:58 +01:00
|
|
|
}
|
|
|
|
} else {
|
|
|
|
*-g++{#Don't use additional GCC keys on Windows system.
|
2014-03-24 16:02:57 +01:00
|
|
|
QMAKE_CXXFLAGS += -O0 -Wall -Wextra -pedantic
|
2014-01-02 18:35:58 +01:00
|
|
|
}
|
2013-11-28 17:28:49 +01:00
|
|
|
}
|
2013-07-28 00:18:06 +02:00
|
|
|
}else{
|
|
|
|
# Release
|
2013-11-28 17:28:49 +01:00
|
|
|
*-g++{
|
2014-03-24 16:02:57 +01:00
|
|
|
QMAKE_CXXFLAGS += -O2
|
2013-11-28 17:28:49 +01:00
|
|
|
}
|
2013-09-26 15:05:21 +02:00
|
|
|
|
2013-11-06 14:34:54 +01:00
|
|
|
DEFINES += QT_NO_DEBUG_OUTPUT
|
2013-07-28 00:18:06 +02:00
|
|
|
}
|
2013-09-18 18:52:49 +02:00
|
|
|
|
2013-10-01 20:15:59 +02:00
|
|
|
message(Qt version: $$[QT_VERSION])
|
|
|
|
message(Qt is installed in $$[QT_INSTALL_PREFIX])
|
|
|
|
message(Qt resources can be found in the following locations:)
|
|
|
|
message(Documentation: $$[QT_INSTALL_DOCS])
|
|
|
|
message(Header files: $$[QT_INSTALL_HEADERS])
|
|
|
|
message(Libraries: $$[QT_INSTALL_LIBS])
|
|
|
|
message(Binary files (executables): $$[QT_INSTALL_BINS])
|
|
|
|
message(Plugins: $$[QT_INSTALL_PLUGINS])
|
|
|
|
message(Data files: $$[QT_INSTALL_DATA])
|
|
|
|
message(Translation files: $$[QT_INSTALL_TRANSLATIONS])
|
|
|
|
message(Settings: $$[QT_INSTALL_SETTINGS])
|
|
|
|
message(Examples: $$[QT_INSTALL_EXAMPLES])
|
2013-11-21 09:33:11 +01:00
|
|
|
|
|
|
|
win32:RC_FILE = share/resources/valentina.rc
|
2013-11-21 14:06:23 +01:00
|
|
|
|
2013-11-26 17:43:26 +01:00
|
|
|
# Remove generated files at cleaning
|
|
|
|
QMAKE_DISTCLEAN += $${DESTDIR}/* \
|
|
|
|
$${OBJECTS_DIR}/* \
|
|
|
|
$${UI_DIR}/* \
|
2013-12-20 15:47:11 +01:00
|
|
|
$${MOC_DIR}/* \
|
2014-02-17 19:31:49 +01:00
|
|
|
$${RCC_DIR}/* \
|
|
|
|
$$PWD/share/translations/valentina_*.qm
|
2013-11-26 17:43:26 +01:00
|
|
|
|
2014-02-19 22:21:57 +01:00
|
|
|
INSTALL_TRANSLATIONS += share/translations/valentina_ru.qm \
|
|
|
|
share/translations/valentina_uk.qm \
|
|
|
|
share/translations/valentina_de.qm \
|
|
|
|
share/translations/valentina_cs.qm \
|
|
|
|
share/translations/valentina_he_IL.qm \
|
|
|
|
share/translations/valentina_fr.qm
|
|
|
|
|
2014-03-16 15:17:07 +01:00
|
|
|
INSTALL_STANDARD_MEASHUREMENTS += share/tables/standard/GOST_man_ru.vst
|
|
|
|
|
|
|
|
INSTALL_INDIVIDUAL_MEASHUREMENTS += share/tables/individual/indivindual_ru.vit
|
|
|
|
|
2013-11-21 14:06:23 +01:00
|
|
|
unix {
|
|
|
|
#VARIABLES
|
|
|
|
isEmpty(PREFIX) {
|
|
|
|
PREFIX = /usr
|
|
|
|
}
|
2013-11-26 17:43:26 +01:00
|
|
|
BINDIR = $$PREFIX/bin
|
2013-11-21 14:06:23 +01:00
|
|
|
DATADIR =$$PREFIX/share
|
|
|
|
DEFINES += DATADIR=\\\"$$DATADIR\\\" PKGDATADIR=\\\"$$PKGDATADIR\\\"
|
|
|
|
#MAKE INSTALL
|
2013-11-22 12:27:46 +01:00
|
|
|
target.path = $$BINDIR
|
2013-11-26 17:43:26 +01:00
|
|
|
desktop.path = $$DATADIR/applications/
|
|
|
|
desktop.files += dist/$${TARGET}.desktop
|
|
|
|
pixmaps.path = $$DATADIR/pixmaps/
|
|
|
|
pixmaps.files += dist/$${TARGET}.png
|
|
|
|
translations.path = $$DATADIR/$${TARGET}/translations/
|
|
|
|
translations.files = $$INSTALL_TRANSLATIONS
|
2014-03-16 15:17:07 +01:00
|
|
|
standard.path = $$DATADIR/$${TARGET}/tables/standard/
|
|
|
|
standard.files = $$INSTALL_STANDARD_MEASHUREMENTS
|
|
|
|
individual.path = $$DATADIR/$${TARGET}/tables/individual/
|
|
|
|
individual.files = $$INSTALL_INDIVIDUAL_MEASHUREMENTS
|
2013-11-22 12:27:46 +01:00
|
|
|
INSTALLS += target \
|
2013-11-26 17:43:26 +01:00
|
|
|
desktop \
|
|
|
|
pixmaps \
|
2014-03-16 15:17:07 +01:00
|
|
|
translations \
|
|
|
|
standard \
|
|
|
|
individual
|
2014-02-17 19:31:49 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
!isEmpty(TRANSLATIONS): {
|
|
|
|
for(_translation_name, TRANSLATIONS) {
|
|
|
|
_translation_name_qm = $$section(_translation_name,".", 0, 0).qm
|
|
|
|
|
|
|
|
system($$shell_path($$[QT_INSTALL_BINS]/lrelease) $$shell_path($$PWD/$$_translation_name) -qm $$shell_path($$PWD/$$_translation_name_qm))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
# Copies the given files to the destination directory
|
|
|
|
defineTest(copyToDestdir) {
|
|
|
|
files = $$1
|
|
|
|
DDIR = $$2
|
|
|
|
mkpath($$DDIR)
|
|
|
|
|
|
|
|
for(FILE, files) {
|
|
|
|
|
|
|
|
# Replace slashes in paths with backslashes for Windows
|
2014-02-19 22:21:57 +01:00
|
|
|
win32{
|
|
|
|
FILE ~= s,/,\\,g
|
|
|
|
DDIR ~= s,/,\\,g
|
|
|
|
}
|
2014-02-17 19:31:49 +01:00
|
|
|
QMAKE_POST_LINK += $$QMAKE_COPY $$quote($$FILE) $$quote($$DDIR) $$escape_expand(\\n\\t)
|
|
|
|
}
|
|
|
|
|
|
|
|
export(QMAKE_POST_LINK)
|
|
|
|
}
|
|
|
|
|
|
|
|
for(DIR, INSTALL_TRANSLATIONS) {
|
|
|
|
#add these absolute paths to a variable which
|
|
|
|
#ends up as 'mkcommands = path1 path2 path3 ...'
|
|
|
|
tr_path += $$PWD/$$DIR
|
|
|
|
}
|
|
|
|
|
|
|
|
copyToDestdir($$tr_path, $$shell_path($$OUT_PWD/$$DESTDIR/translations))
|
2014-03-16 15:17:07 +01:00
|
|
|
|
|
|
|
for(DIR, INSTALL_STANDARD_MEASHUREMENTS) {
|
|
|
|
#add these absolute paths to a variable which
|
|
|
|
#ends up as 'mkcommands = path1 path2 path3 ...'
|
|
|
|
st_path += $$PWD/$$DIR
|
|
|
|
}
|
|
|
|
|
|
|
|
copyToDestdir($$st_path, $$shell_path($$OUT_PWD/$$DESTDIR/tables/standard))
|
|
|
|
|
|
|
|
for(DIR, INSTALL_INDIVIDUAL_MEASHUREMENTS) {
|
|
|
|
#add these absolute paths to a variable which
|
|
|
|
#ends up as 'mkcommands = path1 path2 path3 ...'
|
|
|
|
ind_path += $$PWD/$$DIR
|
|
|
|
}
|
|
|
|
|
|
|
|
copyToDestdir($$ind_path, $$shell_path($$OUT_PWD/$$DESTDIR/tables/individual))
|