This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/packages/myddas/sqlite3/CMakeLists.txt

77 lines
2.0 KiB
CMake
Raw Normal View History

2016-11-11 07:23:34 +00:00
message( " * Sqlite3 Data-Base (http://www.sqlite3ql.org), distributed with MYDDAS" )
2015-11-05 17:06:15 +00:00
set( YAPSQLITE3_SOURCES
myddas_sqlite3.c
2016-11-24 04:35:39 +00:00
src/sqlite3.c
src/sqlite3.h
src/sqlite3ext.h
2015-11-05 17:06:15 +00:00
)
2016-11-11 07:23:34 +00:00
#sqlite3 is now in the system
set (SQLITE3_FOUND ON CACHE PRIVATE "")
include_directories ( ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/..)
2017-09-19 13:19:13 +01:00
if (ANDROID)
add_definitions(-DSQLITE_FCNTL_MMAP_SIZE=0 )
endif()
2016-11-11 07:23:34 +00:00
add_definitions(-DSQLITE_ENABLE_COLUMN_METADATA=1 )
add_definitions(-DSQLITE_ENABLE_JSON1=1 )
add_definitions(-DSQLITE_ENABLE_RBU=1 )
add_definitions(-DSQLITE_ENABLE_RTREE=1 )
add_definitions(-DSQLITE_ENABLE_FTS5=1 )
SET_PROPERTY(DIRECTORY PROPERTY COMPILE_DEFINITIONS YAP_KERNEL=1 )
2016-11-11 07:23:34 +00:00
2016-08-02 01:16:39 +01:00
if (ANDROID)
2016-11-11 07:23:34 +00:00
2017-09-19 13:19:13 +01:00
include_directories( .. src/Android/jni/sqlite src/Android/jni/sqlite/nativehelper )
2016-11-11 07:23:34 +00:00
2017-09-19 13:19:13 +01:00
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
)
2016-04-05 08:09:39 +01:00
2016-11-11 07:23:34 +00:00
endif (ANDROID)
2017-11-18 00:04:42 +00:00
add_library( Yapsqlite3 SHARED
2017-09-19 13:19:13 +01:00
${YAPSQLITE3_SOURCES} )
2016-11-11 15:53:09 +00:00
2017-11-18 00:04:42 +00:00
set_target_properties(Yapsqlite3
2017-09-19 13:19:13 +01:00
PROPERTIES
# RPATH ${libdir} VERSION ${LIBYAPTAI_FULL_VERSION}
# SOVERSION ${LIBYAPTAI_MAJOR_VERSION}.${LIBYAPTAI_MINOR_VERSION}
POSITION_INDEPENDENT_CODE TRUE
2017-11-18 00:04:42 +00:00
)
2017-07-25 01:10:44 +01:00
2017-09-19 13:19:13 +01:00
target_link_libraries(Yapsqlite3 libYap)
2017-07-25 01:10:44 +01:00
if (ANDROID)
2017-09-19 13:19:13 +01:00
target_link_libraries(Yapsqlite3 android log)
2017-07-25 01:10:44 +01:00
2017-09-06 01:09:46 +01:00
endif ()
2017-11-18 00:04:42 +00:00
install(TARGETS Yapsqlite3
RUNTIME DESTINATION ${dlls}
ARCHIVE DESTINATION ${dlls}
LIBRARY DESTINATION ${dlls}
)