Initial commit for new static library IFC (internal format converter).

--HG--
branch : feature
This commit is contained in:
dismine 2014-12-10 19:18:22 +02:00
parent 2ccb7ca797
commit c97668d3d3
9 changed files with 278 additions and 2 deletions

View file

@ -10,11 +10,13 @@ TEMPLATE = app
DEPENDPATH += \
../src/app \
../src/libs/qmuparser \
../src/libs/vpropertyexplorer
../src/libs/vpropertyexplorer \
../src/libs/ifc
include(../src/app/app.pri)
include(../src/libs/qmuparser/qmuparser.pri)
include(../src/libs/vpropertyexplorer/vpropertyexplorer.pri)
include(../src/libs/ifc/ifc.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

@ -346,6 +346,14 @@ else:unix: LIBS += -L$${OUT_PWD}/../libs/vpropertyexplorer/$${DESTDIR} -lvproper
INCLUDEPATH += $${PWD}/../libs/vpropertyexplorer
DEPENDPATH += $${PWD}/../libs/vpropertyexplorer
# 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
# Strip after you link all libaries.
CONFIG(release, debug|release){

10
src/libs/ifc/ifc.pri Normal file
View file

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

84
src/libs/ifc/ifc.pro Normal file
View file

@ -0,0 +1,84 @@
#-------------------------------------------------
#
# Project created by QtCreator 2014-12-10T17:53:37
#
#-------------------------------------------------
# File with common stuff for whole project
include(../../../Valentina.pri)
# Library work with xml.
QT += xml xmlpatterns printsupport
# We don't need gui library.
QT -= gui
# Name of library
TARGET = ifc # Internal Format Converter
# We want create 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
include(ifc.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 Valentina.pri.
$$enable_ccache()
# Set precompiled headers. Function set_PCH() defined in Valentina.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 Valentina.pri for more details.
}
clang*{
QMAKE_CXXFLAGS += \
# Key -isystem disable checking errors in system headers.
-isystem "$${OUT_PWD}/$${MOC_DIR}" \
$$CLANG_DEBUG_CXXFLAGS # See Valentina.pri for more details.
}
} else {
*-g++{
QMAKE_CXXFLAGS += $$GCC_DEBUG_CXXFLAGS # See Valentina.pri for more details.
}
}
}else{
# Release mode
!unix:*-g++{
QMAKE_CXXFLAGS += -fno-omit-frame-pointer # Need for exchndl.dll
}
!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 =
}
}

30
src/libs/ifc/stable.cpp Normal file
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 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/ifc/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 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 IFC 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,34 @@
/************************************************************************
**
** @file vabstractconverter.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) 2014 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 "vabstractconverter.h"
VAbstractConverter::VAbstractConverter()
{
}

View file

@ -0,0 +1,40 @@
/************************************************************************
**
** @file vabstractconverter.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) 2014 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 VABSTRACTCONVERTER_H
#define VABSTRACTCONVERTER_H
class VAbstractConverter
{
public:
VAbstractConverter();
};
#endif // VABSTRACTCONVERTER_H

View file

@ -1,4 +1,5 @@
TEMPLATE = subdirs
CONFIG += ordered
SUBDIRS = qmuparser \
vpropertyexplorer
vpropertyexplorer \
ifc