android
This commit is contained in:
parent
e93c01f8e0
commit
7219992154
@ -518,16 +518,17 @@ set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS UTF8PROC=1)
|
|||||||
include_directories(utf8proc packages/myddas packages/myddas/sqlite3/src)
|
include_directories(utf8proc packages/myddas packages/myddas/sqlite3/src)
|
||||||
|
|
||||||
|
|
||||||
|
set_property(SOURCE ${LIBYAP_SOURCES} APPEND PROPERTY COMPILE_DEFINITIONS YAP_KERNEL=1)
|
||||||
|
|
||||||
|
add_definitions(-DUSE_MYDDAS=1 -DMYDDAS_SQLITE3=1)
|
||||||
|
|
||||||
if (ANDROID)
|
if (ANDROID)
|
||||||
include_directories(
|
include_directories(
|
||||||
packages/myddas/sqlite3/src/Android/jni/sqlite
|
packages/myddas/sqlite3/src/Android/jni/sqlite
|
||||||
packages/myddas/sqlite3/src/Android/jni/sqlite/nativehelper
|
packages/myddas/sqlite3/src/Android/jni/sqlite/nativehelper
|
||||||
)
|
)
|
||||||
endif (ANDROID)
|
|
||||||
|
|
||||||
set_property(SOURCE ${LIBYAP_SOURCES} APPEND PROPERTY COMPILE_DEFINITIONS YAP_KERNEL=1)
|
else()
|
||||||
|
|
||||||
add_definitions(-DUSE_MYDDAS=1 -DMYDDAS_SQLITE3=1)
|
|
||||||
|
|
||||||
if (MYSQL_FOUND)
|
if (MYSQL_FOUND)
|
||||||
add_definitions(= -DMYDDAS_MYSQL=1)
|
add_definitions(= -DMYDDAS_MYSQL=1)
|
||||||
@ -540,7 +541,7 @@ endif ()
|
|||||||
if (MYSQL_POSTGRES)
|
if (MYSQL_POSTGRES)
|
||||||
add_definitions(= -DMYDDAS_POSTGRES=1)
|
add_definitions(= -DMYDDAS_POSTGRES=1)
|
||||||
endif ()
|
endif ()
|
||||||
|
endif()
|
||||||
|
|
||||||
OPTION(WITH_SWIG " Enable SWIG interfaces to foreign languages" ON)
|
OPTION(WITH_SWIG " Enable SWIG interfaces to foreign languages" ON)
|
||||||
|
|
||||||
|
@ -2,11 +2,11 @@ message( " * Sqlite3 Data-Base (http://www.sqlite3ql.org), distributed with MY
|
|||||||
|
|
||||||
set( YAPSQLITE3_SOURCES
|
set( YAPSQLITE3_SOURCES
|
||||||
myddas_sqlite3.c
|
myddas_sqlite3.c
|
||||||
src/sqlite3.c
|
|
||||||
src/sqlite3.h
|
src/sqlite3.h
|
||||||
src/sqlite3ext.h
|
src/sqlite3ext.h
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
#sqlite3 is now in the system
|
#sqlite3 is now in the system
|
||||||
|
|
||||||
set (SQLITE3_FOUND ON CACHE PRIVATE "")
|
set (SQLITE3_FOUND ON CACHE PRIVATE "")
|
||||||
@ -30,45 +30,26 @@ add_definitions(-DSQLITE_ENABLE_FTS5=1 )
|
|||||||
|
|
||||||
SET_PROPERTY(DIRECTORY PROPERTY COMPILE_DEFINITIONS YAP_KERNEL=1 )
|
SET_PROPERTY(DIRECTORY PROPERTY COMPILE_DEFINITIONS YAP_KERNEL=1 )
|
||||||
|
|
||||||
if (ANDROID)
|
|
||||||
|
|
||||||
include_directories( .. src/Android/jni/sqlite src/Android/jni/sqlite/nativehelper )
|
|
||||||
|
|
||||||
|
|
||||||
set(YAPSQLITE3_SOURCES
|
|
||||||
${YAPSQLITE3_SOURCES}
|
|
||||||
src/Android/jni/sqlite/JNIHelp.cpp
|
|
||||||
src/Android/jni/sqlite/JniConstants.cpp
|
|
||||||
src/Android/jni/sqlite/android_database_SQLiteCommon.cpp
|
|
||||||
src/Android/jni/sqlite/android_database_SQLiteCommon.h
|
|
||||||
src/Android/jni/sqlite/android_database_SQLiteConnection.cpp
|
|
||||||
src/Android/jni/sqlite/android_database_SQLiteDebug.cpp
|
|
||||||
src/Android/jni/sqlite/android_database_SQLiteGlobal.cpp
|
|
||||||
src/Android/jni/sqlite/nativehelper/jni.h
|
|
||||||
src/Android/jni/sqlite/nativehelper/JniConstants.h
|
|
||||||
src/Android/jni/sqlite/nativehelper/JNIHelp.h
|
|
||||||
src/Android/jni/sqlite/nativehelper/ScopedLocalRef.h
|
|
||||||
)
|
|
||||||
|
|
||||||
endif (ANDROID)
|
|
||||||
|
|
||||||
add_library( Yapsqlite3 OBJECT
|
add_library( Yapsqlite3 OBJECT
|
||||||
${YAPSQLITE3_SOURCES} )
|
${YAPSQLITE3_SOURCES} )
|
||||||
|
|
||||||
set_target_properties(Yapsqlite3
|
|
||||||
|
if (NOT ANDROID)
|
||||||
|
add_library( sqlite4YAP SHARED
|
||||||
|
src/sqlite3.c)
|
||||||
|
|
||||||
|
set_target_properties(sqlite4YAP
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
# RPATH ${libdir} VERSION ${LIBYAPTAI_FULL_VERSION}
|
# RPATH ${libdir} VERSION ${LIBYAPTAI_FULL_VERSION}
|
||||||
# SOVERSION ${LIBYAPTAI_MAJOR_VERSION}.${LIBYAPTAI_MINOR_VERSION}
|
# SOVERSION ${LIBYAPTAI_MAJOR_VERSION}.${LIBYAPTAI_MINOR_VERSION}
|
||||||
POSITION_INDEPENDENT_CODE TRUE
|
POSITION_INDEPENDENT_CODE TRUE
|
||||||
)
|
)
|
||||||
|
|
||||||
#target_link_libraries(Yapsqlite3 libYap)
|
|
||||||
|
|
||||||
# target_link_libraries(Yapsqlite3 android log)
|
install(TARGETS sqlite4YAP
|
||||||
|
RUNTIME DESTINATION ${YAP_INSTALL_DLLDIR}
|
||||||
|
ARCHIVE DESTINATION ${YAP_INSTALL_DLLDIR}
|
||||||
#install(TARGETS Yapsqlite3
|
LIBRARY DESTINATION ${YAP_INSTALL_DLLDIR}
|
||||||
# RUNTIME DESTINATION ${YAP_INSTALL_DLLDIR}
|
)
|
||||||
# ARCHIVE DESTINATION ${YAP_INSTALL_DLLDIR}
|
endif()
|
||||||
# LIBRARY DESTINATION ${YAP_INSTALL_DLLDIR}
|
|
||||||
# )
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -15,12 +15,10 @@
|
|||||||
** as extensions by SQLite should #include this file instead of
|
** as extensions by SQLite should #include this file instead of
|
||||||
** sqlite3.h.
|
** sqlite3.h.
|
||||||
*/
|
*/
|
||||||
#ifndef _SQLITE3EXT_H_
|
#ifndef SQLITE3EXT_H
|
||||||
#define _SQLITE3EXT_H_
|
#define SQLITE3EXT_H
|
||||||
#include "sqlite3.h"
|
#include "sqlite3.h"
|
||||||
|
|
||||||
typedef struct sqlite3_api_routines sqlite3_api_routines;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** The following structure holds pointers to all of the SQLite API
|
** The following structure holds pointers to all of the SQLite API
|
||||||
** routines.
|
** routines.
|
||||||
@ -136,7 +134,7 @@ struct sqlite3_api_routines {
|
|||||||
int (*set_authorizer)(sqlite3*,int(*)(void*,int,const char*,const char*,
|
int (*set_authorizer)(sqlite3*,int(*)(void*,int,const char*,const char*,
|
||||||
const char*,const char*),void*);
|
const char*,const char*),void*);
|
||||||
void (*set_auxdata)(sqlite3_context*,int,void*,void (*)(void*));
|
void (*set_auxdata)(sqlite3_context*,int,void*,void (*)(void*));
|
||||||
char * (*snprintf)(int,char*,const char*,...);
|
char * (*xsnprintf)(int,char*,const char*,...);
|
||||||
int (*step)(sqlite3_stmt*);
|
int (*step)(sqlite3_stmt*);
|
||||||
int (*table_column_metadata)(sqlite3*,const char*,const char*,const char*,
|
int (*table_column_metadata)(sqlite3*,const char*,const char*,const char*,
|
||||||
char const**,char const**,int*,int*,int*);
|
char const**,char const**,int*,int*,int*);
|
||||||
@ -248,7 +246,7 @@ struct sqlite3_api_routines {
|
|||||||
int (*uri_boolean)(const char*,const char*,int);
|
int (*uri_boolean)(const char*,const char*,int);
|
||||||
sqlite3_int64 (*uri_int64)(const char*,const char*,sqlite3_int64);
|
sqlite3_int64 (*uri_int64)(const char*,const char*,sqlite3_int64);
|
||||||
const char *(*uri_parameter)(const char*,const char*);
|
const char *(*uri_parameter)(const char*,const char*);
|
||||||
char *(*vsnprintf)(int,char*,const char*,va_list);
|
char *(*xvsnprintf)(int,char*,const char*,va_list);
|
||||||
int (*wal_checkpoint_v2)(sqlite3*,const char*,int,int*,int*);
|
int (*wal_checkpoint_v2)(sqlite3*,const char*,int,int*,int*);
|
||||||
/* Version 3.8.7 and later */
|
/* Version 3.8.7 and later */
|
||||||
int (*auto_extension)(void(*)(void));
|
int (*auto_extension)(void(*)(void));
|
||||||
@ -281,8 +279,34 @@ struct sqlite3_api_routines {
|
|||||||
int (*db_cacheflush)(sqlite3*);
|
int (*db_cacheflush)(sqlite3*);
|
||||||
/* Version 3.12.0 and later */
|
/* Version 3.12.0 and later */
|
||||||
int (*system_errno)(sqlite3*);
|
int (*system_errno)(sqlite3*);
|
||||||
|
/* Version 3.14.0 and later */
|
||||||
|
int (*trace_v2)(sqlite3*,unsigned,int(*)(unsigned,void*,void*,void*),void*);
|
||||||
|
char *(*expanded_sql)(sqlite3_stmt*);
|
||||||
|
/* Version 3.18.0 and later */
|
||||||
|
void (*set_last_insert_rowid)(sqlite3*,sqlite3_int64);
|
||||||
|
/* Version 3.20.0 and later */
|
||||||
|
int (*prepare_v3)(sqlite3*,const char*,int,unsigned int,
|
||||||
|
sqlite3_stmt**,const char**);
|
||||||
|
int (*prepare16_v3)(sqlite3*,const void*,int,unsigned int,
|
||||||
|
sqlite3_stmt**,const void**);
|
||||||
|
int (*bind_pointer)(sqlite3_stmt*,int,void*,const char*,void(*)(void*));
|
||||||
|
void (*result_pointer)(sqlite3_context*,void*,const char*,void(*)(void*));
|
||||||
|
void *(*value_pointer)(sqlite3_value*,const char*);
|
||||||
|
int (*vtab_nochange)(sqlite3_context*);
|
||||||
|
int (*value_nochange)(sqlite3_value*);
|
||||||
|
const char *(*vtab_collation)(sqlite3_index_info*,int);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
** This is the function signature used for all extension entry points. It
|
||||||
|
** is also defined in the file "loadext.c".
|
||||||
|
*/
|
||||||
|
typedef int (*sqlite3_loadext_entry)(
|
||||||
|
sqlite3 *db, /* Handle to the database. */
|
||||||
|
char **pzErrMsg, /* Used to set error string on failure. */
|
||||||
|
const sqlite3_api_routines *pThunk /* Extension API function pointers. */
|
||||||
|
);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** The following macros redefine the API routines so that they are
|
** The following macros redefine the API routines so that they are
|
||||||
** redirected through the global sqlite3_api structure.
|
** redirected through the global sqlite3_api structure.
|
||||||
@ -397,7 +421,7 @@ struct sqlite3_api_routines {
|
|||||||
#define sqlite3_rollback_hook sqlite3_api->rollback_hook
|
#define sqlite3_rollback_hook sqlite3_api->rollback_hook
|
||||||
#define sqlite3_set_authorizer sqlite3_api->set_authorizer
|
#define sqlite3_set_authorizer sqlite3_api->set_authorizer
|
||||||
#define sqlite3_set_auxdata sqlite3_api->set_auxdata
|
#define sqlite3_set_auxdata sqlite3_api->set_auxdata
|
||||||
#define sqlite3_snprintf sqlite3_api->snprintf
|
#define sqlite3_snprintf sqlite3_api->xsnprintf
|
||||||
#define sqlite3_step sqlite3_api->step
|
#define sqlite3_step sqlite3_api->step
|
||||||
#define sqlite3_table_column_metadata sqlite3_api->table_column_metadata
|
#define sqlite3_table_column_metadata sqlite3_api->table_column_metadata
|
||||||
#define sqlite3_thread_cleanup sqlite3_api->thread_cleanup
|
#define sqlite3_thread_cleanup sqlite3_api->thread_cleanup
|
||||||
@ -421,7 +445,7 @@ struct sqlite3_api_routines {
|
|||||||
#define sqlite3_value_text16le sqlite3_api->value_text16le
|
#define sqlite3_value_text16le sqlite3_api->value_text16le
|
||||||
#define sqlite3_value_type sqlite3_api->value_type
|
#define sqlite3_value_type sqlite3_api->value_type
|
||||||
#define sqlite3_vmprintf sqlite3_api->vmprintf
|
#define sqlite3_vmprintf sqlite3_api->vmprintf
|
||||||
#define sqlite3_vsnprintf sqlite3_api->vsnprintf
|
#define sqlite3_vsnprintf sqlite3_api->xvsnprintf
|
||||||
#define sqlite3_overload_function sqlite3_api->overload_function
|
#define sqlite3_overload_function sqlite3_api->overload_function
|
||||||
#define sqlite3_prepare_v2 sqlite3_api->prepare_v2
|
#define sqlite3_prepare_v2 sqlite3_api->prepare_v2
|
||||||
#define sqlite3_prepare16_v2 sqlite3_api->prepare16_v2
|
#define sqlite3_prepare16_v2 sqlite3_api->prepare16_v2
|
||||||
@ -497,7 +521,7 @@ struct sqlite3_api_routines {
|
|||||||
#define sqlite3_uri_boolean sqlite3_api->uri_boolean
|
#define sqlite3_uri_boolean sqlite3_api->uri_boolean
|
||||||
#define sqlite3_uri_int64 sqlite3_api->uri_int64
|
#define sqlite3_uri_int64 sqlite3_api->uri_int64
|
||||||
#define sqlite3_uri_parameter sqlite3_api->uri_parameter
|
#define sqlite3_uri_parameter sqlite3_api->uri_parameter
|
||||||
#define sqlite3_uri_vsnprintf sqlite3_api->vsnprintf
|
#define sqlite3_uri_vsnprintf sqlite3_api->xvsnprintf
|
||||||
#define sqlite3_wal_checkpoint_v2 sqlite3_api->wal_checkpoint_v2
|
#define sqlite3_wal_checkpoint_v2 sqlite3_api->wal_checkpoint_v2
|
||||||
/* Version 3.8.7 and later */
|
/* Version 3.8.7 and later */
|
||||||
#define sqlite3_auto_extension sqlite3_api->auto_extension
|
#define sqlite3_auto_extension sqlite3_api->auto_extension
|
||||||
@ -526,6 +550,21 @@ struct sqlite3_api_routines {
|
|||||||
#define sqlite3_db_cacheflush sqlite3_api->db_cacheflush
|
#define sqlite3_db_cacheflush sqlite3_api->db_cacheflush
|
||||||
/* Version 3.12.0 and later */
|
/* Version 3.12.0 and later */
|
||||||
#define sqlite3_system_errno sqlite3_api->system_errno
|
#define sqlite3_system_errno sqlite3_api->system_errno
|
||||||
|
/* Version 3.14.0 and later */
|
||||||
|
#define sqlite3_trace_v2 sqlite3_api->trace_v2
|
||||||
|
#define sqlite3_expanded_sql sqlite3_api->expanded_sql
|
||||||
|
/* Version 3.18.0 and later */
|
||||||
|
#define sqlite3_set_last_insert_rowid sqlite3_api->set_last_insert_rowid
|
||||||
|
/* Version 3.20.0 and later */
|
||||||
|
#define sqlite3_prepare_v3 sqlite3_api->prepare_v3
|
||||||
|
#define sqlite3_prepare16_v3 sqlite3_api->prepare16_v3
|
||||||
|
#define sqlite3_bind_pointer sqlite3_api->bind_pointer
|
||||||
|
#define sqlite3_result_pointer sqlite3_api->result_pointer
|
||||||
|
#define sqlite3_value_pointer sqlite3_api->value_pointer
|
||||||
|
/* Version 3.22.0 and later */
|
||||||
|
#define sqlite3_vtab_nochange sqlite3_api->vtab_nochange
|
||||||
|
#define sqlite3_value_nochange sqltie3_api->value_nochange
|
||||||
|
#define sqlite3_vtab_collation sqltie3_api->vtab_collation
|
||||||
#endif /* !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION) */
|
#endif /* !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION) */
|
||||||
|
|
||||||
#if !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION)
|
#if !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION)
|
||||||
@ -543,4 +582,4 @@ struct sqlite3_api_routines {
|
|||||||
# define SQLITE_EXTENSION_INIT3 /*no-op*/
|
# define SQLITE_EXTENSION_INIT3 /*no-op*/
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* _SQLITE3EXT_H_ */
|
#endif /* SQLITE3EXT_H */
|
||||||
|
Reference in New Issue
Block a user