2014-04-25 10:58:33 +02:00
|
|
|
#-------------------------------------------------
|
|
|
|
#
|
|
|
|
# Project created by QtCreator 2013-06-18T12:36:43
|
|
|
|
#
|
|
|
|
#-------------------------------------------------
|
|
|
|
|
|
|
|
# Use out-of-source builds (shadow builds)
|
|
|
|
|
2014-05-15 11:29:12 +02:00
|
|
|
include(../../Valentina.pri)
|
|
|
|
|
2014-04-25 10:58:33 +02:00
|
|
|
QT += core gui widgets xml svg printsupport xmlpatterns
|
|
|
|
|
|
|
|
TEMPLATE = app
|
|
|
|
|
|
|
|
TARGET = valentina
|
|
|
|
|
|
|
|
CONFIG -= debug_and_release debug_and_release_target
|
|
|
|
CONFIG += c++11
|
|
|
|
|
|
|
|
#DEFINES += ...
|
|
|
|
|
|
|
|
# directory for executable file
|
|
|
|
DESTDIR = bin
|
|
|
|
|
|
|
|
# files created moc
|
|
|
|
MOC_DIR = moc
|
|
|
|
|
|
|
|
# objecs files
|
|
|
|
OBJECTS_DIR = obj
|
|
|
|
|
|
|
|
# files created rcc
|
|
|
|
RCC_DIR = rcc
|
|
|
|
|
|
|
|
# files created uic
|
|
|
|
UI_DIR = uic
|
|
|
|
|
|
|
|
include(container/container.pri)
|
|
|
|
include(dialogs/dialogs.pri)
|
|
|
|
include(exception/exception.pri)
|
|
|
|
include(geometry/geometry.pri)
|
|
|
|
include(tools/tools.pri)
|
|
|
|
include(widgets/widgets.pri)
|
|
|
|
include(xml/xml.pri)
|
2014-06-09 19:39:18 +02:00
|
|
|
include(undocommands/undocommands.pri)
|
2014-07-14 20:16:00 +02:00
|
|
|
include(visualization/visualization.pri)
|
2014-04-25 10:58:33 +02:00
|
|
|
|
2014-08-12 13:30:20 +02:00
|
|
|
INCLUDEPATH += "$${PWD}/widgets"
|
|
|
|
|
2014-04-25 10:58:33 +02:00
|
|
|
SOURCES += \
|
|
|
|
main.cpp \
|
|
|
|
mainwindow.cpp \
|
|
|
|
tablewindow.cpp \
|
|
|
|
stable.cpp \
|
2014-05-13 10:08:37 +02:00
|
|
|
version.cpp \
|
2014-05-22 10:08:12 +02:00
|
|
|
options.cpp
|
2014-04-25 10:58:33 +02:00
|
|
|
|
|
|
|
HEADERS += \
|
|
|
|
mainwindow.h \
|
|
|
|
options.h \
|
|
|
|
tablewindow.h \
|
|
|
|
stable.h \
|
|
|
|
version.h
|
|
|
|
|
|
|
|
FORMS += \
|
|
|
|
mainwindow.ui \
|
|
|
|
tablewindow.ui
|
|
|
|
|
|
|
|
RESOURCES += \
|
|
|
|
share/resources/icon.qrc \
|
|
|
|
share/resources/cursor.qrc \
|
|
|
|
share/resources/theme.qrc \
|
2014-05-15 09:42:15 +02:00
|
|
|
share/resources/schema.qrc \
|
|
|
|
share/resources/measurements.qrc
|
2014-04-25 10:58:33 +02:00
|
|
|
|
2014-05-11 19:22:11 +02:00
|
|
|
OTHER_FILES += \
|
|
|
|
share/resources/valentina.rc \
|
2014-07-21 13:47:48 +02:00
|
|
|
share/resources/valentina.exe.manifest \
|
2014-04-25 10:58:33 +02:00
|
|
|
share/resources/icon/64x64/icon64x64.ico
|
|
|
|
|
|
|
|
TRANSLATIONS += share/translations/valentina.ts \
|
2014-09-09 15:11:50 +02:00
|
|
|
share/translations/valentina_ru_RU.ts \
|
|
|
|
share/translations/valentina_uk_UA.ts \
|
|
|
|
share/translations/valentina_de_DE.ts \
|
|
|
|
share/translations/valentina_cs_CZ.ts \
|
2014-04-25 10:58:33 +02:00
|
|
|
share/translations/valentina_he_IL.ts \
|
2014-09-09 15:11:50 +02:00
|
|
|
share/translations/valentina_fr_FR.ts \
|
|
|
|
share/translations/valentina_it_IT.ts \
|
|
|
|
share/translations/valentina_nl_NL.ts
|
2014-04-25 10:58:33 +02:00
|
|
|
|
|
|
|
unix {
|
2014-05-31 16:33:37 +02:00
|
|
|
*-g++{
|
|
|
|
QMAKE_CXX = ccache g++
|
|
|
|
}
|
|
|
|
clang*{
|
|
|
|
QMAKE_CXX = ccache clang++
|
|
|
|
}
|
2014-04-25 10:58:33 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
CONFIG += precompile_header
|
|
|
|
# Precompiled headers (PCH)
|
|
|
|
PRECOMPILED_HEADER = stable.h
|
|
|
|
win32-msvc* {
|
|
|
|
PRECOMPILED_SOURCE = stable.cpp
|
|
|
|
}
|
|
|
|
|
|
|
|
CONFIG(debug, debug|release){
|
|
|
|
# Debug
|
|
|
|
unix {
|
|
|
|
*-g++{
|
2014-06-02 09:43:27 +02:00
|
|
|
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/QtXmlPatterns" \
|
|
|
|
-isystem "/usr/include/qt5/QtCore" \
|
|
|
|
-isystem "$${OUT_PWD}/$${UI_DIR}" \
|
|
|
|
-isystem "$${OUT_PWD}/$${MOC_DIR}" \
|
|
|
|
-isystem "$${OUT_PWD}/$${RCC_DIR}" \
|
2014-09-11 18:52:02 +02:00
|
|
|
$$GCC_CXXFLAGS
|
2014-04-25 10:58:33 +02:00
|
|
|
}
|
2014-06-01 09:35:13 +02:00
|
|
|
#Turn on Clang warnings
|
|
|
|
clang*{
|
|
|
|
QMAKE_CXXFLAGS += \
|
2014-06-02 09:43:27 +02:00
|
|
|
-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 "/usr/include/qt5/QtXmlPatterns" \
|
|
|
|
-isystem "$${OUT_PWD}/$${UI_DIR}" \
|
|
|
|
-isystem "$${OUT_PWD}/$${MOC_DIR}" \
|
|
|
|
-isystem "$${OUT_PWD}/$${RCC_DIR}" \
|
2014-09-11 18:52:02 +02:00
|
|
|
$$CLANG_CXXFLAGS
|
2014-06-01 09:35:13 +02:00
|
|
|
}
|
2014-04-25 10:58:33 +02:00
|
|
|
} else {
|
|
|
|
*-g++{#Don't use additional GCC keys on Windows system.
|
|
|
|
QMAKE_CXXFLAGS += -O0 -Wall -Wextra -pedantic
|
|
|
|
}
|
|
|
|
}
|
2014-06-25 14:26:44 +02:00
|
|
|
|
2014-06-26 18:08:17 +02:00
|
|
|
#Calculate revision number only in release mode. Change revision number each time requare recompilation
|
2014-06-25 14:26:44 +02:00
|
|
|
#precompiled headers file.
|
2014-06-26 18:08:17 +02:00
|
|
|
DEFINES += "LOC_REV=0"
|
2014-04-25 10:58:33 +02:00
|
|
|
}else{
|
|
|
|
# Release
|
|
|
|
DEFINES += QT_NO_DEBUG_OUTPUT
|
2014-06-26 19:50:37 +02:00
|
|
|
|
2014-09-24 21:54:53 +02:00
|
|
|
unix:QMAKE_CXXFLAGS_RELEASE += -g
|
2014-09-24 19:51:06 +02:00
|
|
|
|
2014-06-25 14:26:44 +02:00
|
|
|
#local revision number for using in version
|
2014-06-26 19:50:37 +02:00
|
|
|
HG_REV=$$system(hg parents --template '{rev}')
|
|
|
|
isEmpty(HG_REV){
|
|
|
|
HG_REV = 0
|
2014-06-25 14:26:44 +02:00
|
|
|
}
|
2014-06-26 19:50:37 +02:00
|
|
|
DEFINES += "LOC_REV=$${HG_REV}"
|
2014-04-25 10:58:33 +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])
|
|
|
|
|
|
|
|
win32:RC_FILE = share/resources/valentina.rc
|
|
|
|
|
2014-05-15 11:29:12 +02:00
|
|
|
INSTALL_TRANSLATIONS += \
|
2014-09-10 17:12:37 +02:00
|
|
|
share/translations/valentina_ru_RU.qm \
|
|
|
|
share/translations/valentina_uk_UA.qm \
|
|
|
|
share/translations/valentina_de_DE.qm \
|
|
|
|
share/translations/valentina_cs_CZ.qm \
|
2014-05-15 11:29:12 +02:00
|
|
|
share/translations/valentina_he_IL.qm \
|
2014-09-10 17:12:37 +02:00
|
|
|
share/translations/valentina_fr_FR.qm \
|
|
|
|
share/translations/valentina_it_IT.qm \
|
|
|
|
share/translations/valentina_nl_NL.qm
|
2014-04-25 10:58:33 +02:00
|
|
|
|
2014-05-15 11:29:12 +02:00
|
|
|
INSTALL_STANDARD_MEASHUREMENTS += share/resources/tables/standard/GOST_man_ru.vst
|
2014-04-25 10:58:33 +02:00
|
|
|
|
|
|
|
unix {
|
|
|
|
#VARIABLES
|
|
|
|
isEmpty(PREFIX) {
|
|
|
|
PREFIX = /usr
|
|
|
|
}
|
|
|
|
BINDIR = $$PREFIX/bin
|
|
|
|
DATADIR =$$PREFIX/share
|
|
|
|
DEFINES += DATADIR=\\\"$$DATADIR\\\" PKGDATADIR=\\\"$$PKGDATADIR\\\"
|
|
|
|
#MAKE INSTALL
|
|
|
|
target.path = $$BINDIR
|
|
|
|
desktop.path = $$DATADIR/applications/
|
2014-06-30 16:20:49 +02:00
|
|
|
desktop.files += ../../dist/$${TARGET}.desktop
|
2014-04-25 10:58:33 +02:00
|
|
|
pixmaps.path = $$DATADIR/pixmaps/
|
2014-06-30 16:20:49 +02:00
|
|
|
pixmaps.files += ../../dist/$${TARGET}.png
|
2014-04-25 10:58:33 +02:00
|
|
|
translations.path = $$DATADIR/$${TARGET}/translations/
|
|
|
|
translations.files = $$INSTALL_TRANSLATIONS
|
|
|
|
standard.path = $$DATADIR/$${TARGET}/tables/standard/
|
|
|
|
standard.files = $$INSTALL_STANDARD_MEASHUREMENTS
|
2014-05-15 11:29:12 +02:00
|
|
|
INSTALLS += \
|
|
|
|
target \
|
2014-04-25 10:58:33 +02:00
|
|
|
desktop \
|
|
|
|
pixmaps \
|
|
|
|
translations \
|
2014-05-15 11:29:12 +02:00
|
|
|
standard
|
2014-04-25 10:58:33 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
!isEmpty(TRANSLATIONS): {
|
|
|
|
for(_translation_name, TRANSLATIONS) {
|
|
|
|
_translation_name_qm = $$section(_translation_name,".", 0, 0).qm
|
|
|
|
|
2014-08-26 17:06:14 +02:00
|
|
|
system($$shell_path($$[QT_INSTALL_BINS]/lrelease) $$shell_path($${PWD}/$$_translation_name) -qm $$shell_path($${PWD}/$$_translation_name_qm))
|
2014-04-25 10:58:33 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
for(DIR, INSTALL_TRANSLATIONS) {
|
|
|
|
#add these absolute paths to a variable which
|
|
|
|
#ends up as 'mkcommands = path1 path2 path3 ...'
|
2014-08-26 17:06:14 +02:00
|
|
|
tr_path += $${PWD}/$$DIR
|
2014-04-25 10:58:33 +02:00
|
|
|
}
|
|
|
|
|
2014-08-26 17:06:14 +02:00
|
|
|
copyToDestdir($$tr_path, $$shell_path($${OUT_PWD}/$$DESTDIR/translations))
|
2014-04-25 10:58:33 +02:00
|
|
|
|
|
|
|
for(DIR, INSTALL_STANDARD_MEASHUREMENTS) {
|
|
|
|
#add these absolute paths to a variable which
|
|
|
|
#ends up as 'mkcommands = path1 path2 path3 ...'
|
2014-08-26 17:06:14 +02:00
|
|
|
st_path += $${PWD}/$$DIR
|
2014-04-25 10:58:33 +02:00
|
|
|
}
|
|
|
|
|
2014-08-26 17:06:14 +02:00
|
|
|
copyToDestdir($$st_path, $$shell_path($${OUT_PWD}/$$DESTDIR/tables/standard))
|
2014-04-25 10:58:33 +02:00
|
|
|
|
2014-08-26 17:06:14 +02:00
|
|
|
win32:CONFIG(release, debug|release): LIBS += -L$${OUT_PWD}/../libs/qmuparser/$${DESTDIR} -lqmuparser2
|
|
|
|
else:win32:CONFIG(debug, debug|release): LIBS += -L$${OUT_PWD}/../libs/qmuparser/$${DESTDIR} -lqmuparser2
|
|
|
|
else:unix: LIBS += -L$${OUT_PWD}/../libs/qmuparser/$${DESTDIR} -lqmuparser
|
2014-04-25 14:58:14 +02:00
|
|
|
|
2014-08-26 17:06:14 +02:00
|
|
|
INCLUDEPATH += $${PWD}/../libs/qmuparser
|
|
|
|
DEPENDPATH += $${PWD}/../libs/qmuparser
|
|
|
|
|
|
|
|
win32:CONFIG(release, debug|release): LIBS += -L$${OUT_PWD}/../libs/vpropertyexplorer/$${DESTDIR} -lvpropertyexplorer
|
|
|
|
else:win32:CONFIG(debug, debug|release): LIBS += -L$${OUT_PWD}/../libs/vpropertyexplorer/$${DESTDIR} -lvpropertyexplorer
|
|
|
|
else:unix: LIBS += -L$${OUT_PWD}/../libs/vpropertyexplorer/$${DESTDIR} -lvpropertyexplorer
|
|
|
|
|
|
|
|
INCLUDEPATH += $${PWD}/../libs/vpropertyexplorer
|
|
|
|
DEPENDPATH += $${PWD}/../libs/vpropertyexplorer
|
2014-09-24 19:51:06 +02:00
|
|
|
|
|
|
|
CONFIG(release, debug|release){
|
|
|
|
unix:QMAKE_POST_LINK += objcopy --only-keep-debug $(TARGET) $(TARGET).debug &&
|
|
|
|
unix:QMAKE_POST_LINK += strip --strip-debug --strip-unneeded $(TARGET) &&
|
|
|
|
unix:QMAKE_POST_LINK += objcopy --add-gnu-debuglink $(TARGET).debug $(TARGET)
|
|
|
|
}
|