Commit 43051fd4 authored by Daniel Vrátil's avatar Daniel Vrátil 🤖

One more xsltproc conversion

parent 684b30f6
......@@ -9,18 +9,16 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_BINARY_DIR}/src/server
${Akonadi_SOURCE_DIR}/src/server)
akonadi_generate_schema(${CMAKE_CURRENT_SOURCE_DIR}/dbtest_data/unittest_schema.xml UnitTestSchema unittestschema)
set(AKONADI_DB_DATA ${CMAKE_CURRENT_SOURCE_DIR}/dbtest_data/dbdata.xml)
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/dbpopulator.cpp
COMMAND ${XSLTPROC_EXECUTABLE}
--output ${CMAKE_CURRENT_BINARY_DIR}/dbpopulator.cpp
${CMAKE_CURRENT_SOURCE_DIR}/dbpopulator.xsl
${AKONADI_DB_DATA}
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/dbpopulator.xsl
${AKONADI_DB_DATA}
akonadi_run_xsltproc(
XSL ${Akonadi_SOURCE_DIR}/src/server/storage/schema.xsl
XML ${CMAKE_CURRENT_SOURCE_DIR}/dbtest_data/unittest_schema.xml
BASENAME unittestschema
CLASSNAME UnitTestSchema
)
akonadi_run_xsltproc(
XSL ${CMAKE_CURRENT_SOURCE_DIR}/dbpopulator.xsl
XML ${CMAKE_CURRENT_SOURCE_DIR}/dbtest_data/dbdata.xml
BASENAME dbpopulator
)
set_property(SOURCE ${CMAKE_CURRENT_BINARY_DIR}/dbpopulator.cpp PROPERTY SKIP_AUTOMOC TRUE)
......
/*
* Copyright (C) 2014 Daniel Vrátil <dvratil@redhat.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
#ifndef AKONADI_SERVER_DBPOPULATOR_H
#define AKONADI_SERVER_DBPOPULATOR_H
namespace Akonadi {
namespace Server {
class DbPopulator
{
public:
DbPopulator();
~DbPopulator();
bool run();
};
}
}
#endif // AKONADI_SERVER_DBPOPULATOR_H
......@@ -315,8 +315,36 @@
<xsl:template match="/">
<!-- Header generation //-->
<xsl:if test="$code='header'">
/*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
*/
#ifndef AKONADI_SERVER_DBPOPULATOR_H
#define AKONADI_SERVER_DBPOPULATOR_H
namespace Akonadi {
namespace Server {
class DbPopulator
{
public:
DbPopulator();
~DbPopulator();
bool run();
};
}
}
#endif
</xsl:if>
<!-- Source generation //-->
<xsl:if test="$code='source'">
/*
* This is an auto-generated file.
* Do not edit! All changes made to it will be lost.
......@@ -394,6 +422,7 @@ bool DbPopulator::run()
qDebug() &lt;&lt; "Database successfully populated";
return true;
}
</xsl:if>
</xsl:template>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment