New static library VFormat.

--HG--
branch : feature
This commit is contained in:
Roman Telezhynskyi 2015-07-14 20:22:31 +03:00
parent e72c54318a
commit 1aad1090b1
10 changed files with 303 additions and 8 deletions

View File

@ -17,7 +17,8 @@ DEPENDPATH += \
../src/libs/vgeometry \
../src/libs/vpatterndb \
../src/libs/vmisc \
../src/libs/vtools
../src/libs/vtools \
../src/libs/vformat
include(../src/app/valentina/valentina.pri)
include(../src/libs/qmuparser/qmuparser.pri)
@ -29,6 +30,7 @@ include(../src/libs/vgeometry/vgeometry.pri)
include(../src/libs/vpatterndb/vpatterndb.pri)
include(../src/libs/vmisc/vmisc.pri)
include(../src/libs/vtools/vtools.pri)
include(../src/libs/vformat/vformat.pri)
# Add here path to new translation file with name "valentina_*_*.ts" if you want to add new language.
# Same paths in variable INSTALL_TRANSLATIONS (app.pro).

View File

@ -6,17 +6,17 @@ SOURCES += \
$$PWD/tmainwindow.cpp \
$$PWD/stable.cpp \
$$PWD/mapplication.cpp \
dialogs/dialogabouttape.cpp \
dialogs/dialognewmeasurements.cpp
$$PWD/dialogs/dialogabouttape.cpp \
$$PWD/dialogs/dialognewmeasurements.cpp
HEADERS += \
$$PWD/tmainwindow.h \
$$PWD/stable.h \
$$PWD/mapplication.h \
dialogs/dialogabouttape.h \
dialogs/dialognewmeasurements.h
$$PWD/dialogs/dialogabouttape.h \
$$PWD/dialogs/dialognewmeasurements.h
FORMS += \
$$PWD/tmainwindow.ui \
dialogs/dialogabouttape.ui \
dialogs/dialognewmeasurements.ui
$$PWD/dialogs/dialogabouttape.ui \
$$PWD/dialogs/dialognewmeasurements.ui

View File

@ -150,6 +150,15 @@ DEPENDPATH += $$PWD/../../libs/vwidgets
win32:!win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vwidgets/$${DESTDIR}/vwidgets.lib
else:unix|win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vwidgets/$${DESTDIR}/libvwidgets.a
# VFormat static library (depend on VPatternDB)
unix|win32: LIBS += -L$$OUT_PWD/../../libs/vformat/$${DESTDIR}/ -lvformat
INCLUDEPATH += $$PWD/../../libs/vformat
DEPENDPATH += $$PWD/../../libs/vformat
win32:!win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vformat/$${DESTDIR}/vformat.lib
else:unix|win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../../libs/vformat/$${DESTDIR}/libvformat.a
#VPatternDB static library (depend on vgeometry, vmisc)
unix|win32: LIBS += -L$$OUT_PWD/../../libs/vpatterndb/$${DESTDIR} -lvpatterndb

View File

@ -9,4 +9,5 @@ SUBDIRS = \
vpatterndb \
vmisc \
vwidgets \
vtools
vtools \
vformat

View File

@ -0,0 +1,30 @@
/************************************************************************
**
** @file stable.cpp
** @author Roman Telezhynskyi <dismine(at)gmail.com>
** @date 10 12, 2014
**
** @brief
** @copyright
** This source code is part of the Valentine project, a pattern making
** program, whose allow create and modeling patterns of clothing.
** Copyright (C) 2013-2015 Valentina project
** <https://bitbucket.org/dismine/valentina> All Rights Reserved.
**
** Valentina is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation, either version 3 of the License, or
** (at your option) any later version.
**
** Valentina is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with Valentina. If not, see <http://www.gnu.org/licenses/>.
**
*************************************************************************/
// Build the precompiled headers.
#include "stable.h"

67
src/libs/vformat/stable.h Normal file
View File

@ -0,0 +1,67 @@
/************************************************************************
**
** @file stable.h
** @author Roman Telezhynskyi <dismine(at)gmail.com>
** @date 10 12, 2014
**
** @brief
** @copyright
** This source code is part of the Valentine project, a pattern making
** program, whose allow create and modeling patterns of clothing.
** Copyright (C) 2013-2015 Valentina project
** <https://bitbucket.org/dismine/valentina> All Rights Reserved.
**
** Valentina is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation, either version 3 of the License, or
** (at your option) any later version.
**
** Valentina is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with Valentina. If not, see <http://www.gnu.org/licenses/>.
**
*************************************************************************/
#ifndef STABLE_H
#define STABLE_H
/* I like to include this pragma too, so the build log indicates if pre-compiled headers were in use. */
#ifndef __clang__
#pragma message("Compiling precompiled headers for VFormat library.\n")
#endif
/* Add C includes here */
#if defined __cplusplus
/* Add C++ includes here */
#ifdef QT_CORE_LIB
#include <QtCore>
#endif
#ifdef QT_XML_LIB
# include <QtXml>
#endif
//In Windows you can't use those headers in all modes.
#if !defined(Q_OS_WIN)
# ifdef QT_PRINTSUPPORT_LIB
# include <QtPrintSupport>
# endif
# ifdef QT_XMLPATTERNS_LIB
# include <QtXmlPatterns>
# endif
# ifdef QT_NETWORK_LIB
# include <QtNetwork>
# endif
#endif/*Q_OS_WIN*/
#endif/*__cplusplus*/
#endif // STABLE_H

View File

@ -0,0 +1,10 @@
# ADD TO EACH PATH $$PWD VARIABLE!!!!!!
# This need for corect working file translations.pro
SOURCES += \
$$PWD/vmeasurements.cpp \
$$PWD/stable.cpp
HEADERS += \
$$PWD/vmeasurements.h \
$$PWD/stable.h

View File

@ -0,0 +1,102 @@
#-------------------------------------------------
#
# Project created by QtCreator 2015-07-14T20:08:14
#
#-------------------------------------------------
# File with common stuff for whole project
include(../../../common.pri)
# Library work with xml.
QT += xml xmlpatterns printsupport
# We don't need gui library.
QT -= gui
# Name of the library
TARGET = vformat
# We want create a library
TEMPLATE = lib
CONFIG += \
staticlib \# Making static library
c++11 # We use C++11 standard
# Use out-of-source builds (shadow builds)
CONFIG -= debug_and_release debug_and_release_target
# 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
include(vformat.pri)
# This is static library so no need in "make install"
# directory for executable file
DESTDIR = bin
# files created moc
MOC_DIR = moc
# objecs files
OBJECTS_DIR = obj
# Set using ccache. Function enable_ccache() defined in common.pri.
$$enable_ccache()
# Set precompiled headers. Function set_PCH() defined in common.pri.
$$set_PCH()
CONFIG(debug, debug|release){
# Debug mode
unix {
#Turn on compilers warnings.
*-g++{
QMAKE_CXXFLAGS += \
# Key -isystem disable checking errors in system headers.
-isystem "$${OUT_PWD}/$${MOC_DIR}" \
$$GCC_DEBUG_CXXFLAGS # See common.pri for more details.
noAddressSanitizer{ # For enable run qmake with CONFIG+=noAddressSanitizer
# do nothing
} else {
#gccs 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
}
}
clang*{
QMAKE_CXXFLAGS += \
# Key -isystem disable checking errors in system headers.
-isystem "$${OUT_PWD}/$${MOC_DIR}" \
$$CLANG_DEBUG_CXXFLAGS # See common.pri for more details.
}
} else {
*-g++{
QMAKE_CXXFLAGS += $$GCC_DEBUG_CXXFLAGS # See common.pri for more details.
}
}
}else{
# Release mode
DEFINES += V_NO_ASSERT
!unix:*-g++{
QMAKE_CXXFLAGS += -fno-omit-frame-pointer # Need for exchndl.dll
}
noDebugSymbols{ # For enable run qmake with CONFIG+=noDebugSymbols
# do nothing
} else {
!macx:!win32-msvc*{
# 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 =
}
}
}

View File

@ -0,0 +1,34 @@
/************************************************************************
**
** @file vmeasurements.cpp
** @author Roman Telezhynskyi <dismine(at)gmail.com>
** @date 14 7, 2015
**
** @brief
** @copyright
** This source code is part of the Valentine project, a pattern making
** program, whose allow create and modeling patterns of clothing.
** Copyright (C) 2015 Valentina project
** <https://bitbucket.org/dismine/valentina> All Rights Reserved.
**
** Valentina is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation, either version 3 of the License, or
** (at your option) any later version.
**
** Valentina is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with Valentina. If not, see <http://www.gnu.org/licenses/>.
**
*************************************************************************/
#include "vmeasurements.h"
VMeasurements::VMeasurements()
{
}

View File

@ -0,0 +1,40 @@
/************************************************************************
**
** @file vmeasurements.h
** @author Roman Telezhynskyi <dismine(at)gmail.com>
** @date 14 7, 2015
**
** @brief
** @copyright
** This source code is part of the Valentine project, a pattern making
** program, whose allow create and modeling patterns of clothing.
** Copyright (C) 2015 Valentina project
** <https://bitbucket.org/dismine/valentina> All Rights Reserved.
**
** Valentina is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation, either version 3 of the License, or
** (at your option) any later version.
**
** Valentina is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with Valentina. If not, see <http://www.gnu.org/licenses/>.
**
*************************************************************************/
#ifndef VMEASUREMENTS_H
#define VMEASUREMENTS_H
class VMeasurements
{
public:
VMeasurements();
};
#endif // VMEASUREMENTS_H