From 44372c7e6b879a9d0d751e265c0ddfb7e06b295c Mon Sep 17 00:00:00 2001 From: dismine Date: Fri, 2 Jan 2015 15:53:36 +0200 Subject: [PATCH] Initial commit for static library VLayout. --HG-- branch : feature --- src/libs/libs.pro | 3 +- src/libs/vlayout/stable.cpp | 30 +++++++++ src/libs/vlayout/stable.h | 48 ++++++++++++++ src/libs/vlayout/vlayout.pri | 10 +++ src/libs/vlayout/vlayout.pro | 90 +++++++++++++++++++++++++++ src/libs/vlayout/vlayoutgenerator.cpp | 34 ++++++++++ src/libs/vlayout/vlayoutgenerator.h | 40 ++++++++++++ 7 files changed, 254 insertions(+), 1 deletion(-) create mode 100644 src/libs/vlayout/stable.cpp create mode 100644 src/libs/vlayout/stable.h create mode 100644 src/libs/vlayout/vlayout.pri create mode 100644 src/libs/vlayout/vlayout.pro create mode 100644 src/libs/vlayout/vlayoutgenerator.cpp create mode 100644 src/libs/vlayout/vlayoutgenerator.h diff --git a/src/libs/libs.pro b/src/libs/libs.pro index 1828fc39e..508095bbf 100644 --- a/src/libs/libs.pro +++ b/src/libs/libs.pro @@ -3,4 +3,5 @@ CONFIG += ordered SUBDIRS = qmuparser \ vpropertyexplorer \ ifc \ - vobj + vobj \ + vlayout diff --git a/src/libs/vlayout/stable.cpp b/src/libs/vlayout/stable.cpp new file mode 100644 index 000000000..71d31cdba --- /dev/null +++ b/src/libs/vlayout/stable.cpp @@ -0,0 +1,30 @@ +/************************************************************************ + ** + ** @file stable.cpp + ** @author Roman Telezhynskyi + ** @date 2 1, 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) 2013 Valentina project + ** 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 . + ** + *************************************************************************/ + +// Build the precompiled headers. +#include "stable.h" diff --git a/src/libs/vlayout/stable.h b/src/libs/vlayout/stable.h new file mode 100644 index 000000000..8a4f7cdfc --- /dev/null +++ b/src/libs/vlayout/stable.h @@ -0,0 +1,48 @@ +/************************************************************************ + ** + ** @file stable.h + ** @author Roman Telezhynskyi + ** @date 2 1, 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) 2013 Valentina project + ** 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 . + ** + *************************************************************************/ + +#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 VLayout library.\n") +#endif + +/* Add C includes here */ + +#if defined __cplusplus +/* Add C++ includes here */ + +#ifdef QT_CORE_LIB +#include +#endif + +#endif/*__cplusplus*/ + +#endif // STABLE_H diff --git a/src/libs/vlayout/vlayout.pri b/src/libs/vlayout/vlayout.pri new file mode 100644 index 000000000..5f07bede4 --- /dev/null +++ b/src/libs/vlayout/vlayout.pri @@ -0,0 +1,10 @@ +# ADD TO EACH PATH $$PWD VARIABLE!!!!!! +# This need for corect working file translations.pro + +HEADERS += \ + $$PWD/stable.h \ + $$PWD/vlayoutgenerator.h + +SOURCES += \ + $$PWD/stable.cpp \ + $$PWD/vlayoutgenerator.cpp diff --git a/src/libs/vlayout/vlayout.pro b/src/libs/vlayout/vlayout.pro new file mode 100644 index 000000000..96f9fd549 --- /dev/null +++ b/src/libs/vlayout/vlayout.pro @@ -0,0 +1,90 @@ +#------------------------------------------------- +# +# Project created by QtCreator 2015-01-02T15:39:01 +# +#------------------------------------------------- + +# File with common stuff for whole project +include(../../../Valentina.pri) + +# We don't need gui library. +QT -= gui + +# Name of library +TARGET = vlayout + +# 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 + +# 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(vlayout.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. + + #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 + } + 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 + DEFINES += V_NO_ASSERT + !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 = + } +} diff --git a/src/libs/vlayout/vlayoutgenerator.cpp b/src/libs/vlayout/vlayoutgenerator.cpp new file mode 100644 index 000000000..2f719e99b --- /dev/null +++ b/src/libs/vlayout/vlayoutgenerator.cpp @@ -0,0 +1,34 @@ +/************************************************************************ + ** + ** @file vlayoutgenerator.cpp + ** @author Roman Telezhynskyi + ** @date 2 1, 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 + ** 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 . + ** + *************************************************************************/ + +#include "vlayoutgenerator.h" + + +VLayoutGenerator::VLayoutGenerator() +{ +} diff --git a/src/libs/vlayout/vlayoutgenerator.h b/src/libs/vlayout/vlayoutgenerator.h new file mode 100644 index 000000000..191446010 --- /dev/null +++ b/src/libs/vlayout/vlayoutgenerator.h @@ -0,0 +1,40 @@ +/************************************************************************ + ** + ** @file vlayoutgenerator.h + ** @author Roman Telezhynskyi + ** @date 2 1, 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 + ** 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 . + ** + *************************************************************************/ + +#ifndef VLAYOUTGENERATOR_H +#define VLAYOUTGENERATOR_H + + +class VLayoutGenerator +{ + +public: + VLayoutGenerator(); +}; + +#endif // VLAYOUTGENERATOR_H