sqlite backend: made it possible to compile out-of-tree
config.h is now only included if HAVE_CONFIG_H is set. ENABLE_SQLITE can be set via -D instead. Removed inclusion of "test.h" and "syncevo/Logging.h", we don't install it. Moved header files around so that they are only included when needed. Added a README with compile instructions.
This commit is contained in:
parent
2e938f6520
commit
7e0770461f
|
@ -0,0 +1,28 @@
|
|||
This is a demo backend. It uses a database schema that is similar to
|
||||
the one used on the iPhone, but it is not as complete.
|
||||
|
||||
To compile this backend as part of SyncEvolution, configure with
|
||||
--enable-sqlite.
|
||||
|
||||
To compile it against a binary distribution of SyncEvolution, make
|
||||
sure that the SyncEvolution, Synthesis and sqlite developer files are
|
||||
installed and that pkg-config can find syncevolution.pc, synthesis.pc
|
||||
and sqlite.pc. Set your PKG_CONFIG_PATH if necessary.
|
||||
|
||||
Then the source files can be compiled as follows:
|
||||
g++ -fpic -DPIC -DENABLE_SQLITE -shared -I. \
|
||||
`pkg-config --cflags --libs syncevolution`
|
||||
`pkg-config --cflags --libs sqlite`
|
||||
*.cpp \
|
||||
-o /tmp/syncsqlite.so
|
||||
|
||||
Install /tmp/syncsqlite.so by moving it into the
|
||||
"lib/syncevolution/backends" directory of the SyncEvolution
|
||||
installation.
|
||||
|
||||
It then should show up as additional choice for the "type" property:
|
||||
syncevolution --source-property type=?
|
||||
|
||||
...
|
||||
SQLite Address Book = addressbook = contacts = sqlite-contacts
|
||||
vCard 2.1 (default) = text/x-vcard
|
|
@ -18,15 +18,17 @@
|
|||
* 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include <syncevo/Logging.h>
|
||||
#include <syncevo/SynthesisEngine.h>
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include <synthesis/SDK_util.h>
|
||||
#ifdef ENABLE_SQLITE
|
||||
|
||||
#include "SQLiteContactSource.h"
|
||||
|
||||
#include <syncevo/SynthesisEngine.h>
|
||||
#include <synthesis/sync_dbapi.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <cctype>
|
||||
|
|
|
@ -19,7 +19,11 @@
|
|||
*/
|
||||
|
||||
#include "SQLiteContactSource.h"
|
||||
#include "test.h"
|
||||
|
||||
#ifdef ENABLE_UNIT_TESTS
|
||||
# include <cppunit/extensions/TestFactoryRegistry.h>
|
||||
# include <cppunit/extensions/HelperMacros.h>
|
||||
#endif
|
||||
|
||||
static SyncSource *createSource(const SyncSourceParams ¶ms)
|
||||
{
|
||||
|
|
|
@ -17,7 +17,9 @@
|
|||
* 02110-1301 USA
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_SQLITE
|
||||
|
||||
|
|
Loading…
Reference in New Issue