2014-04-25 10:58:33 +02:00
|
|
|
|
#-------------------------------------------------
|
|
|
|
|
#
|
|
|
|
|
# Project created by QtCreator 2013-06-18T12:36:43
|
|
|
|
|
#
|
|
|
|
|
#-------------------------------------------------
|
|
|
|
|
|
2014-10-27 15:29:31 +01:00
|
|
|
|
# Compilation main binary file
|
2014-04-25 10:58:33 +02:00
|
|
|
|
|
2014-10-27 15:29:31 +01:00
|
|
|
|
# File with common stuff for whole project
|
2014-05-15 11:29:12 +02:00
|
|
|
|
include(../../Valentina.pri)
|
|
|
|
|
|
2014-10-27 15:29:31 +01:00
|
|
|
|
# Here we don't see "network" library, but, i think, "printsupport" depend on this library, so we still need this
|
|
|
|
|
# library in installer.
|
2014-04-25 10:58:33 +02:00
|
|
|
|
QT += core gui widgets xml svg printsupport xmlpatterns
|
|
|
|
|
|
2014-10-27 15:29:31 +01:00
|
|
|
|
# We want create executable file
|
2014-04-25 10:58:33 +02:00
|
|
|
|
TEMPLATE = app
|
|
|
|
|
|
2014-10-27 15:29:31 +01:00
|
|
|
|
# Name of binary file
|
2014-04-25 10:58:33 +02:00
|
|
|
|
TARGET = valentina
|
|
|
|
|
|
2014-10-27 15:29:31 +01:00
|
|
|
|
# Use out-of-source builds (shadow builds)
|
2014-04-25 10:58:33 +02:00
|
|
|
|
CONFIG -= debug_and_release debug_and_release_target
|
|
|
|
|
|
2014-10-27 15:29:31 +01:00
|
|
|
|
# We use C++11 standard
|
|
|
|
|
CONFIG += c++11
|
2014-04-25 10:58:33 +02:00
|
|
|
|
|
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-10-27 15:29:31 +01:00
|
|
|
|
# Directory for executable file
|
2014-04-25 10:58:33 +02:00
|
|
|
|
DESTDIR = bin
|
|
|
|
|
|
2014-10-27 15:29:31 +01:00
|
|
|
|
# Directory for files created moc
|
2014-04-25 10:58:33 +02:00
|
|
|
|
MOC_DIR = moc
|
|
|
|
|
|
2014-10-27 15:29:31 +01:00
|
|
|
|
# Directory for objecs files
|
2014-04-25 10:58:33 +02:00
|
|
|
|
OBJECTS_DIR = obj
|
|
|
|
|
|
2014-10-27 15:29:31 +01:00
|
|
|
|
# Directory for files created rcc
|
2014-04-25 10:58:33 +02:00
|
|
|
|
RCC_DIR = rcc
|
|
|
|
|
|
2014-10-27 15:29:31 +01:00
|
|
|
|
# Directory for files created uic
|
2014-04-25 10:58:33 +02:00
|
|
|
|
UI_DIR = uic
|
|
|
|
|
|
2014-10-27 15:29:31 +01:00
|
|
|
|
# Suport subdirectories. Just better project code tree.
|
2014-12-03 15:11:57 +01:00
|
|
|
|
include(app.pri)
|
2015-04-01 14:51:54 +02:00
|
|
|
|
include(../utils/utils.pri)
|
2014-04-25 10:58:33 +02:00
|
|
|
|
|
2014-10-27 15:29:31 +01:00
|
|
|
|
# This include path help promoute VMainGraphicsView on main window. Without it compiler can't find path to custom view
|
2014-08-12 13:30:20 +02:00
|
|
|
|
INCLUDEPATH += "$${PWD}/widgets"
|
|
|
|
|
|
2014-10-27 15:29:31 +01:00
|
|
|
|
# Resource files. This files will be included in binary.
|
2014-04-25 10:58:33 +02:00
|
|
|
|
RESOURCES += \
|
2014-10-27 15:29:31 +01:00
|
|
|
|
share/resources/icon.qrc \ # All other icons except cursors and Windows theme.
|
|
|
|
|
share/resources/cursor.qrc \ # Tools cursor icons.
|
|
|
|
|
share/resources/theme.qrc \ # Windows theme icons.
|
2014-12-05 13:52:24 +01:00
|
|
|
|
share/resources/measurements.qrc \ # For measurements files that we save as resource.
|
|
|
|
|
share/resources/flags.qrc
|
2014-04-25 10:58:33 +02:00
|
|
|
|
|
2014-10-27 15:29:31 +01:00
|
|
|
|
# Compilation will fail without this files after we added them to this section.
|
2014-05-11 19:22:11 +02:00
|
|
|
|
OTHER_FILES += \
|
2014-10-27 15:29:31 +01:00
|
|
|
|
share/resources/valentina.rc \ # For Windows system.
|
|
|
|
|
share/resources/icon/64x64/icon64x64.ico # Valentina's logo.
|
2014-04-25 10:58:33 +02:00
|
|
|
|
|
2014-10-27 15:29:31 +01:00
|
|
|
|
# Set using ccache. Function enable_ccache() defined in Valentina.pri.
|
2014-11-30 16:47:37 +01:00
|
|
|
|
macx {
|
|
|
|
|
CONFIG(debug, debug|release){
|
|
|
|
|
$$enable_ccache()# Use only in debug mode on Mac
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
$$enable_ccache()
|
2014-11-28 20:15:35 +01:00
|
|
|
|
}
|
2014-11-30 16:47:37 +01:00
|
|
|
|
|
2014-10-27 15:29:31 +01:00
|
|
|
|
# Set precompiled headers. Function set_PCH() defined in Valentina.pri.
|
|
|
|
|
$$set_PCH()
|
2014-04-25 10:58:33 +02:00
|
|
|
|
|
|
|
|
|
CONFIG(debug, debug|release){
|
2014-10-27 15:29:31 +01:00
|
|
|
|
# Debug mode
|
2014-04-25 10:58:33 +02:00
|
|
|
|
unix {
|
2014-10-27 15:29:31 +01:00
|
|
|
|
#Turn on compilers warnings.
|
2014-04-25 10:58:33 +02:00
|
|
|
|
*-g++{
|
2014-06-02 09:43:27 +02:00
|
|
|
|
QMAKE_CXXFLAGS += \
|
2014-10-27 15:29:31 +01:00
|
|
|
|
# Key -isystem disable checking errors in system headers.
|
2014-06-02 09:43:27 +02:00
|
|
|
|
-isystem "$${OUT_PWD}/$${UI_DIR}" \
|
|
|
|
|
-isystem "$${OUT_PWD}/$${MOC_DIR}" \
|
|
|
|
|
-isystem "$${OUT_PWD}/$${RCC_DIR}" \
|
2014-10-27 15:29:31 +01:00
|
|
|
|
$$GCC_DEBUG_CXXFLAGS # See Valentina.pri for more details.
|
2014-12-20 19:18:00 +01:00
|
|
|
|
|
|
|
|
|
#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_CFLAGS+=-fsanitize=address -fno-omit-frame-pointer
|
|
|
|
|
QMAKE_LFLAGS+=-fsanitize=address
|
2014-04-25 10:58:33 +02:00
|
|
|
|
}
|
2014-06-01 09:35:13 +02:00
|
|
|
|
clang*{
|
|
|
|
|
QMAKE_CXXFLAGS += \
|
2014-10-27 15:29:31 +01:00
|
|
|
|
# Key -isystem disable checking errors in system headers.
|
2014-06-02 09:43:27 +02:00
|
|
|
|
-isystem "$${OUT_PWD}/$${UI_DIR}" \
|
|
|
|
|
-isystem "$${OUT_PWD}/$${MOC_DIR}" \
|
|
|
|
|
-isystem "$${OUT_PWD}/$${RCC_DIR}" \
|
2014-10-27 15:29:31 +01:00
|
|
|
|
$$CLANG_DEBUG_CXXFLAGS # See Valentina.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 -= \
|
|
|
|
|
-Wmissing-prototypes \
|
|
|
|
|
-Wundefined-reinterpret-cast
|
2014-06-01 09:35:13 +02:00
|
|
|
|
}
|
2014-04-25 10:58:33 +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 10:58:33 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
2014-06-25 14:26:44 +02:00
|
|
|
|
|
2014-12-29 17:06:09 +01:00
|
|
|
|
#Calculate latest tag distance and build revision only in release mode. Change number each time requare
|
|
|
|
|
#recompilation precompiled headers file.
|
|
|
|
|
DEFINES += "LATEST_TAG_DISTANCE=0"
|
2015-01-04 17:11:00 +01:00
|
|
|
|
DEFINES += "BUILD_REVISION=\\\"unknown\\\""
|
2014-04-25 10:58:33 +02:00
|
|
|
|
}else{
|
2014-10-27 15:29:31 +01:00
|
|
|
|
# Release mode
|
2014-12-24 10:54:56 +01:00
|
|
|
|
DEFINES += V_NO_ASSERT
|
2014-11-13 13:14:00 +01:00
|
|
|
|
!unix:*-g++{
|
|
|
|
|
QMAKE_CXXFLAGS += -fno-omit-frame-pointer # Need for exchndl.dll
|
|
|
|
|
}
|
|
|
|
|
|
2014-10-27 15:29:31 +01:00
|
|
|
|
# Turn on debug symbols in release mode on Unix systems.
|
|
|
|
|
# On Mac OS X temporarily disabled. Need find way how to strip binary file.
|
2014-11-13 13:14:00 +01:00
|
|
|
|
!macx:!win32-msvc*{
|
|
|
|
|
QMAKE_CXXFLAGS_RELEASE += -g -gdwarf-3
|
|
|
|
|
QMAKE_CFLAGS_RELEASE += -g -gdwarf-3
|
|
|
|
|
QMAKE_LFLAGS_RELEASE =
|
|
|
|
|
}
|
2014-09-24 19:51:06 +02:00
|
|
|
|
|
2015-03-16 17:31:27 +01:00
|
|
|
|
macx{
|
|
|
|
|
HG = /usr/local/bin/hg # Can't defeat PATH variable on Mac OS.
|
|
|
|
|
}else {
|
|
|
|
|
HG = hg # All other platforms all OK.
|
|
|
|
|
}
|
2014-12-29 17:06:09 +01:00
|
|
|
|
#latest tag distance number for using in version
|
2015-03-16 17:31:27 +01:00
|
|
|
|
HG_DISTANCE=$$system($${HG} log -r. --template '{latesttagdistance}')
|
2014-12-29 17:06:09 +01:00
|
|
|
|
isEmpty(HG_DISTANCE){
|
|
|
|
|
HG_DISTANCE = 0 # if we can't find local revision left 0.
|
2014-06-25 14:26:44 +02:00
|
|
|
|
}
|
2014-12-30 22:21:59 +01:00
|
|
|
|
message("Latest tag distance:" $${HG_DISTANCE})
|
2014-12-29 17:06:09 +01:00
|
|
|
|
DEFINES += "LATEST_TAG_DISTANCE=$${HG_DISTANCE}" # Make available latest tag distance number in sources.
|
|
|
|
|
|
|
|
|
|
#build revision number for using in version
|
2014-12-30 22:21:59 +01:00
|
|
|
|
unix {
|
2015-03-16 17:31:27 +01:00
|
|
|
|
HG_HESH=$$system("$${HG} log -r. --template '{node|short}'")
|
2014-12-30 22:21:59 +01:00
|
|
|
|
} else {
|
|
|
|
|
# Use escape character before "|" on Windows
|
2015-03-16 17:31:27 +01:00
|
|
|
|
HG_HESH=$$system($${HG} log -r. --template "{node^|short}")
|
2014-12-30 22:21:59 +01:00
|
|
|
|
}
|
2014-12-29 17:06:09 +01:00
|
|
|
|
isEmpty(HG_HESH){
|
|
|
|
|
HG_HESH = "unknown" # if we can't find build revision left unknown.
|
|
|
|
|
}
|
2014-12-30 22:21:59 +01:00
|
|
|
|
message("Build revision:" $${HG_HESH})
|
2014-12-29 17:06:09 +01:00
|
|
|
|
DEFINES += "BUILD_REVISION=\\\"$${HG_HESH}\\\"" # Make available build revision number in sources.
|
2014-04-25 10:58:33 +02:00
|
|
|
|
}
|
|
|
|
|
|
2014-10-27 15:29:31 +01:00
|
|
|
|
# Some extra information about Qt. Can be usefull.
|
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])
|
|
|
|
|
|
2014-10-27 15:29:31 +01:00
|
|
|
|
# Path to recource file.
|
2014-04-25 10:58:33 +02:00
|
|
|
|
win32:RC_FILE = share/resources/valentina.rc
|
|
|
|
|
|
2014-11-05 10:27:23 +01:00
|
|
|
|
# Keep path to all files with standard measurements we support right now
|
|
|
|
|
INSTALL_STANDARD_MEASHUREMENTS += share/resources/tables/standard/GOST_man_ru.vst
|
|
|
|
|
|
2014-12-03 15:11:57 +01:00
|
|
|
|
TRANSLATIONS_PATH = ../../share/translations
|
|
|
|
|
|
2014-11-13 17:03:34 +01:00
|
|
|
|
# Add to this variable all translation files that you want install with program.
|
2014-12-03 15:11:57 +01:00
|
|
|
|
# For generation *.qm file first you need create *.ts.
|
|
|
|
|
# See section TRANSLATIONS in file ../../share/translations/translations.pro.
|
2014-11-13 17:03:34 +01:00
|
|
|
|
INSTALL_TRANSLATIONS += \
|
2014-12-03 15:11:57 +01:00
|
|
|
|
$${TRANSLATIONS_PATH}/valentina_ru_RU.qm \
|
|
|
|
|
$${TRANSLATIONS_PATH}/valentina_uk_UA.qm \
|
|
|
|
|
$${TRANSLATIONS_PATH}/valentina_de_DE.qm \
|
|
|
|
|
$${TRANSLATIONS_PATH}/valentina_cs_CZ.qm \
|
|
|
|
|
$${TRANSLATIONS_PATH}/valentina_he_IL.qm \
|
|
|
|
|
$${TRANSLATIONS_PATH}/valentina_fr_FR.qm \
|
|
|
|
|
$${TRANSLATIONS_PATH}/valentina_it_IT.qm \
|
2014-12-05 13:39:27 +01:00
|
|
|
|
$${TRANSLATIONS_PATH}/valentina_nl_NL.qm \
|
2015-02-26 15:10:01 +01:00
|
|
|
|
$${TRANSLATIONS_PATH}/valentina_id_ID.qm \
|
2015-03-23 13:37:53 +01:00
|
|
|
|
$${TRANSLATIONS_PATH}/valentina_es_ES.qm \
|
|
|
|
|
$${TRANSLATIONS_PATH}/valentina_fi_FI.qm
|
2014-10-27 15:29:31 +01:00
|
|
|
|
|
2014-11-13 17:03:34 +01:00
|
|
|
|
# Set "make install" command for Unix-like systems.
|
|
|
|
|
unix{
|
|
|
|
|
# Prefix for binary file.
|
|
|
|
|
isEmpty(PREFIX){
|
|
|
|
|
PREFIX = $$DEFAULT_PREFIX
|
2014-10-27 15:29:31 +01:00
|
|
|
|
}
|
|
|
|
|
|
2014-11-13 17:03:34 +01:00
|
|
|
|
unix:!macx{
|
|
|
|
|
DATADIR =$$PREFIX/share
|
|
|
|
|
DEFINES += DATADIR=\\\"$$DATADIR\\\" PKGDATADIR=\\\"$$PKGDATADIR\\\"
|
2014-10-27 15:29:31 +01:00
|
|
|
|
|
2014-11-13 17:03:34 +01:00
|
|
|
|
# Path to bin file after installation
|
|
|
|
|
target.path = $$PREFIX/bin
|
2014-10-27 15:29:31 +01:00
|
|
|
|
|
2014-12-22 18:06:24 +01:00
|
|
|
|
# .desktop file
|
2014-11-13 17:03:34 +01:00
|
|
|
|
desktop.path = $$DATADIR/applications/
|
|
|
|
|
desktop.files += ../../dist/$${TARGET}.desktop
|
2014-10-27 15:29:31 +01:00
|
|
|
|
|
2014-11-13 17:03:34 +01:00
|
|
|
|
# logo
|
|
|
|
|
pixmaps.path = $$DATADIR/pixmaps/
|
2014-12-22 18:06:24 +01:00
|
|
|
|
pixmaps.files += ../../dist/$${TARGET}.png \
|
|
|
|
|
../../dist/application-x-valentina-pattern.png
|
2014-10-27 15:29:31 +01:00
|
|
|
|
|
2014-11-13 17:03:34 +01:00
|
|
|
|
# Path to translation files after installation
|
|
|
|
|
translations.path = $$DATADIR/$${TARGET}/translations/
|
|
|
|
|
translations.files = $$INSTALL_TRANSLATIONS
|
|
|
|
|
|
|
|
|
|
# Path to standard measurement after installation
|
|
|
|
|
standard.path = $$DATADIR/$${TARGET}/tables/standard/
|
|
|
|
|
standard.files = $$INSTALL_STANDARD_MEASHUREMENTS
|
2014-10-27 15:29:31 +01:00
|
|
|
|
|
2014-11-13 17:03:34 +01:00
|
|
|
|
INSTALLS += \
|
|
|
|
|
target \
|
|
|
|
|
desktop \
|
|
|
|
|
pixmaps \
|
|
|
|
|
translations \
|
|
|
|
|
standard
|
2014-10-27 15:29:31 +01:00
|
|
|
|
}
|
2014-11-13 17:03:34 +01:00
|
|
|
|
macx{
|
|
|
|
|
# Some macx stuff
|
|
|
|
|
QMAKE_MAC_SDK = macosx
|
|
|
|
|
|
|
|
|
|
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6
|
|
|
|
|
# Path to resources in app bundle
|
|
|
|
|
RESOURCES_DIR = "Contents/Resources"
|
|
|
|
|
FRAMEWORKS_DIR = "Contents/Frameworks"
|
|
|
|
|
# On macx we will use app bundle. Bundle doesn't need bin directory inside.
|
|
|
|
|
# See issue #166: Creating OSX Homebrew (Mac OS X package manager) formula.
|
|
|
|
|
target.path = $$PREFIX/
|
|
|
|
|
|
|
|
|
|
# Copy in bundle translation files.
|
2014-12-03 15:11:57 +01:00
|
|
|
|
exists($${TRANSLATIONS_PATH}/valentina_ru_RU.qm){
|
2014-11-13 17:03:34 +01:00
|
|
|
|
TRANSLATION_ru_RU.files += \
|
2014-12-03 15:11:57 +01:00
|
|
|
|
$${TRANSLATIONS_PATH}/valentina_ru_RU.qm \
|
|
|
|
|
$${TRANSLATIONS_PATH}/Localizable.strings
|
2014-11-13 17:03:34 +01:00
|
|
|
|
TRANSLATION_ru_RU.path = "$$RESOURCES_DIR/translations/ru_RU.lproj"
|
|
|
|
|
QMAKE_BUNDLE_DATA += TRANSLATION_ru_RU
|
|
|
|
|
}
|
2014-10-27 15:29:31 +01:00
|
|
|
|
|
2014-12-03 15:11:57 +01:00
|
|
|
|
exists($${TRANSLATIONS_PATH}/valentina_uk_UA.qm){
|
2014-11-13 17:03:34 +01:00
|
|
|
|
TRANSLATION_uk_UA.files += \
|
2014-12-03 15:11:57 +01:00
|
|
|
|
$${TRANSLATIONS_PATH}/valentina_uk_UA.qm \
|
|
|
|
|
$${TRANSLATIONS_PATH}/Localizable.strings
|
2014-11-13 17:03:34 +01:00
|
|
|
|
TRANSLATION_uk_UA.path = "$$RESOURCES_DIR/translations/uk_UA.lproj"
|
|
|
|
|
QMAKE_BUNDLE_DATA += TRANSLATION_uk_UA
|
|
|
|
|
}
|
2014-10-27 15:29:31 +01:00
|
|
|
|
|
2014-12-03 15:11:57 +01:00
|
|
|
|
exists($${TRANSLATIONS_PATH}/valentina_de_DE.qm){
|
2014-11-13 17:03:34 +01:00
|
|
|
|
TRANSLATION_de_DE.files += \
|
2014-12-03 15:11:57 +01:00
|
|
|
|
$${TRANSLATIONS_PATH}/valentina_de_DE.qm \
|
|
|
|
|
$${TRANSLATIONS_PATH}/Localizable.strings
|
2014-11-13 17:03:34 +01:00
|
|
|
|
TRANSLATION_de_DE.path = "$$RESOURCES_DIR/translations/de_DE.lproj"
|
|
|
|
|
QMAKE_BUNDLE_DATA += TRANSLATION_de_DE
|
|
|
|
|
}
|
2014-10-27 15:29:31 +01:00
|
|
|
|
|
2014-12-03 15:11:57 +01:00
|
|
|
|
exists($${TRANSLATIONS_PATH}/valentina_cs_CZ.qm){
|
2014-11-13 17:03:34 +01:00
|
|
|
|
TRANSLATION_cs_CZ.files += \
|
2014-12-03 15:11:57 +01:00
|
|
|
|
$${TRANSLATIONS_PATH}/valentina_cs_CZ.qm \
|
|
|
|
|
$${TRANSLATIONS_PATH}/Localizable.strings
|
2014-11-13 17:03:34 +01:00
|
|
|
|
TRANSLATION_cs_CZ.path = "$$RESOURCES_DIR/translations/cs_CZ.lproj"
|
|
|
|
|
QMAKE_BUNDLE_DATA += TRANSLATION_cs_CZ
|
|
|
|
|
}
|
2014-10-27 15:29:31 +01:00
|
|
|
|
|
2014-12-03 15:11:57 +01:00
|
|
|
|
exists($${TRANSLATIONS_PATH}/valentina_he_IL.qm){
|
2014-11-13 17:03:34 +01:00
|
|
|
|
TRANSLATION_he_IL.files += \
|
2014-12-03 15:11:57 +01:00
|
|
|
|
$${TRANSLATIONS_PATH}/valentina_he_IL.qm \
|
|
|
|
|
$${TRANSLATIONS_PATH}/Localizable.strings
|
2014-11-13 17:03:34 +01:00
|
|
|
|
TRANSLATION_he_IL.path = "$$RESOURCES_DIR/translations/he_IL.lproj"
|
|
|
|
|
QMAKE_BUNDLE_DATA += TRANSLATION_he_IL
|
|
|
|
|
}
|
2014-10-27 15:29:31 +01:00
|
|
|
|
|
2014-12-03 15:11:57 +01:00
|
|
|
|
exists($${TRANSLATIONS_PATH}/valentina_fr_FR.qm){
|
2014-11-13 17:03:34 +01:00
|
|
|
|
TRANSLATION_fr_FR.files += \
|
2014-12-03 15:11:57 +01:00
|
|
|
|
$${TRANSLATIONS_PATH}/valentina_fr_FR.qm \
|
|
|
|
|
$${TRANSLATIONS_PATH}/Localizable.strings
|
2014-11-13 17:03:34 +01:00
|
|
|
|
TRANSLATION_fr_FR.path = "$$RESOURCES_DIR/translations/fr_FR.lproj"
|
|
|
|
|
QMAKE_BUNDLE_DATA += TRANSLATION_fr_FR
|
|
|
|
|
}
|
2014-11-05 10:27:23 +01:00
|
|
|
|
|
2014-12-03 15:11:57 +01:00
|
|
|
|
exists($${TRANSLATIONS_PATH}/valentina_it_IT.qm){
|
2014-11-13 17:03:34 +01:00
|
|
|
|
TRANSLATION_it_IT.files += \
|
2014-12-03 15:11:57 +01:00
|
|
|
|
$${TRANSLATIONS_PATH}/valentina_it_IT.qm \
|
|
|
|
|
$${TRANSLATIONS_PATH}/Localizable.strings
|
2014-11-13 17:03:34 +01:00
|
|
|
|
TRANSLATION_it_IT.path = "$$RESOURCES_DIR/translations/it_IT.lproj"
|
|
|
|
|
QMAKE_BUNDLE_DATA += TRANSLATION_it_IT
|
|
|
|
|
}
|
|
|
|
|
|
2014-12-03 15:11:57 +01:00
|
|
|
|
exists($${TRANSLATIONS_PATH}/valentina_nl_NL.qm){
|
2014-11-13 17:03:34 +01:00
|
|
|
|
TRANSLATION_nl_NL.files += \
|
2014-12-03 15:11:57 +01:00
|
|
|
|
$${TRANSLATIONS_PATH}/valentina_nl_NL.qm \
|
|
|
|
|
$${TRANSLATIONS_PATH}/Localizable.strings
|
2014-11-13 17:03:34 +01:00
|
|
|
|
TRANSLATION_nl_NL.path = "$$RESOURCES_DIR/translations/nl_NL.lproj"
|
|
|
|
|
QMAKE_BUNDLE_DATA += TRANSLATION_nl_NL
|
|
|
|
|
}
|
2014-10-27 15:29:31 +01:00
|
|
|
|
|
2014-12-05 13:39:27 +01:00
|
|
|
|
exists($${TRANSLATIONS_PATH}/valentina_id_ID.qm){
|
|
|
|
|
TRANSLATION_id_ID.files += \
|
|
|
|
|
$${TRANSLATIONS_PATH}/valentina_id_ID.qm \
|
|
|
|
|
$${TRANSLATIONS_PATH}/Localizable.strings
|
|
|
|
|
TRANSLATION_id_ID.path = "$$RESOURCES_DIR/translations/id_ID.lproj"
|
|
|
|
|
QMAKE_BUNDLE_DATA += TRANSLATION_id_ID
|
|
|
|
|
}
|
|
|
|
|
|
2015-02-26 15:10:01 +01:00
|
|
|
|
exists($${TRANSLATIONS_PATH}/valentina_es_ES.qm){
|
|
|
|
|
TRANSLATION_es_ES.files += \
|
|
|
|
|
$${TRANSLATIONS_PATH}/valentina_es_ES.qm \
|
|
|
|
|
$${TRANSLATIONS_PATH}/Localizable.strings
|
|
|
|
|
TRANSLATION_es_ES.path = "$$RESOURCES_DIR/translations/es_ES.lproj"
|
|
|
|
|
QMAKE_BUNDLE_DATA += TRANSLATION_es_ES
|
|
|
|
|
}
|
|
|
|
|
|
2015-03-23 13:37:53 +01:00
|
|
|
|
exists($${TRANSLATIONS_PATH}/valentina_fi_FI.qm){
|
|
|
|
|
TRANSLATION_fi_FI.files += \
|
|
|
|
|
$${TRANSLATIONS_PATH}/valentina_fi_FI.qm \
|
|
|
|
|
$${TRANSLATIONS_PATH}/Localizable.strings
|
|
|
|
|
TRANSLATION_fi_FI.path = "$$RESOURCES_DIR/translations/fi_FI.lproj"
|
|
|
|
|
QMAKE_BUNDLE_DATA += TRANSLATION_fi_FI
|
|
|
|
|
}
|
|
|
|
|
|
2015-01-28 16:33:01 +01:00
|
|
|
|
# Symlinks also good names for copying. Make will take origin file and copy them with using symlink name.
|
|
|
|
|
# For bundle this names more then enough. We don't need care much about libraries versions.
|
|
|
|
|
libraries.path = $$FRAMEWORKS_DIR
|
|
|
|
|
libraries.files += $${OUT_PWD}/../libs/qmuparser/$${DESTDIR}/libqmuparser.2.dylib
|
2015-02-26 21:18:52 +01:00
|
|
|
|
libraries.files += $${OUT_PWD}/../libs/vpropertyexplorer/$${DESTDIR}/libvpropertyexplorer.1.dylib
|
2014-11-19 04:10:57 +01:00
|
|
|
|
|
|
|
|
|
|
2014-10-27 15:29:31 +01:00
|
|
|
|
# logo on macx.
|
2014-11-07 09:25:53 +01:00
|
|
|
|
ICON = ../../dist/Valentina.icns
|
2014-11-05 10:27:23 +01:00
|
|
|
|
|
2014-10-27 15:29:31 +01:00
|
|
|
|
# Copy to bundle standard measurements files
|
|
|
|
|
standard.path = $$RESOURCES_DIR/tables/standard/
|
|
|
|
|
standard.files = $$INSTALL_STANDARD_MEASHUREMENTS
|
|
|
|
|
|
|
|
|
|
QMAKE_BUNDLE_DATA += \
|
|
|
|
|
standard \
|
2015-01-28 16:33:01 +01:00
|
|
|
|
libraries
|
2014-11-13 17:03:34 +01:00
|
|
|
|
}
|
2014-04-25 10:58:33 +02:00
|
|
|
|
}
|
|
|
|
|
|
2014-12-23 13:00:29 +01:00
|
|
|
|
# Some systems use special name for lrelease. For example opensuse 13.2 has lrelease-qt5.
|
|
|
|
|
isEmpty(LRELEASE){
|
|
|
|
|
LRELEASE = lrelease
|
|
|
|
|
}
|
|
|
|
|
|
2014-10-27 15:29:31 +01:00
|
|
|
|
# Run generation *.qm file for available *.ts files each time you run qmake.
|
2014-12-03 15:11:57 +01:00
|
|
|
|
for(_translation_name, INSTALL_TRANSLATIONS) {
|
|
|
|
|
_translation_name_qm = $$basename(_translation_name)
|
|
|
|
|
_translation_name_ts = $$section(_translation_name_qm, ".", 0, 0).ts
|
2014-04-25 10:58:33 +02:00
|
|
|
|
|
2014-12-23 13:00:29 +01:00
|
|
|
|
system($$shell_path($$[QT_INSTALL_BINS]/$$LRELEASE) -removeidentical -nounfinished $$shell_path($${PWD}/$${TRANSLATIONS_PATH}/$$_translation_name_ts) -qm $$shell_path($${PWD}/$$_translation_name))
|
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-11-13 17:03:34 +01:00
|
|
|
|
|
2014-08-26 17:06:14 +02:00
|
|
|
|
tr_path += $${PWD}/$$DIR
|
2014-04-25 10:58:33 +02:00
|
|
|
|
}
|
|
|
|
|
|
2014-10-27 15:29:31 +01:00
|
|
|
|
# Make possible run program even you do not install it. Seek files in local directory.
|
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-10-27 15:29:31 +01:00
|
|
|
|
# QMuParser library
|
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
|
|
|
|
|
|
2014-10-27 15:29:31 +01:00
|
|
|
|
# VPropertyExplorer library
|
2014-08-26 17:06:14 +02:00
|
|
|
|
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
|
|
|
|
|
2014-12-10 18:18:22 +01:00
|
|
|
|
# IFC static library
|
|
|
|
|
unix|win32: LIBS += -L$$OUT_PWD/../libs/ifc/$${DESTDIR}/ -lifc
|
|
|
|
|
|
|
|
|
|
INCLUDEPATH += $$PWD/../libs/ifc
|
|
|
|
|
DEPENDPATH += $$PWD/../libs/ifc
|
|
|
|
|
|
|
|
|
|
win32:!win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../libs/ifc/$${DESTDIR}/ifc.lib
|
|
|
|
|
else:unix|win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../libs/ifc/$${DESTDIR}/libifc.a
|
2014-11-05 10:27:23 +01:00
|
|
|
|
|
2014-12-12 15:08:31 +01:00
|
|
|
|
# VObj static library
|
|
|
|
|
unix|win32: LIBS += -L$$OUT_PWD/../libs/vobj/$${DESTDIR}/ -lvobj
|
|
|
|
|
|
|
|
|
|
INCLUDEPATH += $$PWD/../libs/vobj
|
|
|
|
|
DEPENDPATH += $$PWD/../libs/vobj
|
|
|
|
|
|
|
|
|
|
win32:!win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../libs/vobj/$${DESTDIR}/vobj.lib
|
|
|
|
|
else:unix|win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../libs/vobj/$${DESTDIR}/libvobj.a
|
|
|
|
|
|
2015-01-02 18:02:07 +01:00
|
|
|
|
# VLayout static library
|
|
|
|
|
unix|win32: LIBS += -L$$OUT_PWD/../libs/vlayout/$${DESTDIR}/ -lvlayout
|
|
|
|
|
|
|
|
|
|
INCLUDEPATH += $$PWD/../libs/vlayout
|
|
|
|
|
DEPENDPATH += $$PWD/../libs/vlayout
|
|
|
|
|
|
|
|
|
|
win32:!win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../libs/vlayout/$${DESTDIR}/vlayout.lib
|
|
|
|
|
else:unix|win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../libs/vlayout/$${DESTDIR}/libvlayout.a
|
|
|
|
|
|
2014-12-12 15:08:31 +01:00
|
|
|
|
|
2014-10-27 15:29:31 +01:00
|
|
|
|
# Strip after you link all libaries.
|
2014-09-24 19:51:06 +02:00
|
|
|
|
CONFIG(release, debug|release){
|
2014-11-13 13:14:00 +01:00
|
|
|
|
win32:!win32-msvc*{
|
|
|
|
|
# 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}
|
|
|
|
|
}
|
|
|
|
|
|
2014-10-05 23:07:20 +02:00
|
|
|
|
unix:!macx{
|
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 ${TARGET} ${TARGET}.dbg &&
|
|
|
|
|
QMAKE_POST_LINK += objcopy --strip-debug ${TARGET} &&
|
|
|
|
|
QMAKE_POST_LINK += objcopy --add-gnu-debuglink="${TARGET}.dbg" ${TARGET}
|
2014-10-04 08:55:52 +02:00
|
|
|
|
}
|
2014-09-24 19:51:06 +02:00
|
|
|
|
}
|
2014-11-05 10:27:23 +01:00
|
|
|
|
|
|
|
|
|
|
2014-11-28 19:33:28 +01:00
|
|
|
|
|
2014-11-05 10:27:23 +01:00
|
|
|
|
macx{
|
|
|
|
|
# run macdeployqt to include all qt libraries in packet
|
|
|
|
|
QMAKE_POST_LINK += $$[QT_INSTALL_BINS]/macdeployqt $${OUT_PWD}/$${DESTDIR}/$${TARGET}.app
|
|
|
|
|
}
|