mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-17 19:25:53 +02:00
cmake build: POCO_UNBUNDLED support for sqlite
This commit is contained in:
@@ -3,8 +3,23 @@ set(LIBNAME "${LIBNAME}${LIB_EXT}")
|
||||
|
||||
include_directories( include src )
|
||||
|
||||
set(SRCS "")
|
||||
aux_source_directory(src SRCS)
|
||||
set(SRCS
|
||||
src/Binder.cpp
|
||||
src/Connector.cpp
|
||||
src/Extractor.cpp
|
||||
src/SQLiteException.cpp
|
||||
src/SQLiteStatementImpl.cpp
|
||||
src/SessionImpl.cpp
|
||||
src/Utility.cpp
|
||||
)
|
||||
|
||||
|
||||
if (!POCO_UNBUNDLED)
|
||||
set(SRCS "${SRCS} src/sqlite3.c")
|
||||
set(DATASQLITELIBS PocoData${LIB_EXT} PocoFoundation${LIB_EXT} )
|
||||
else()
|
||||
set(DATASQLITELIBS PocoData${LIB_EXT} PocoFoundation${LIB_EXT} sqlite3)
|
||||
endif()
|
||||
|
||||
add_definitions(-DSQLITE_THREADSAFE=1 -DSQLITE_DISABLE_LFS -DSQLITE_OMIT_UTF16 -DSQLITE_OMIT_PROGRESS_CALLBACK -DSQLITE_OMIT_COMPLETE -DSQLITE_OMIT_TCL_VARIABLE -DSQLITE_OMIT_DEPRECATED)
|
||||
|
||||
@@ -12,7 +27,7 @@ add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} )
|
||||
set_target_properties( ${LIBNAME}
|
||||
PROPERTIES
|
||||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} )
|
||||
target_link_libraries( ${LIBNAME} PocoData${LIB_EXT} PocoFoundation${LIB_EXT})
|
||||
target_link_libraries( ${LIBNAME} ${DATASQLITELIBS} )
|
||||
|
||||
install(
|
||||
DIRECTORY include/Poco
|
||||
|
@@ -1,24 +1,30 @@
|
||||
#
|
||||
# Makefile
|
||||
#
|
||||
# $Id: //poco/Main/Data/SQLite/Makefile#4 $
|
||||
#
|
||||
# Makefile for Poco SQLite
|
||||
#
|
||||
|
||||
include $(POCO_BASE)/build/rules/global
|
||||
|
||||
SYSFLAGS += -DSQLITE_THREADSAFE=1 -DSQLITE_OMIT_UTF16 -DSQLITE_OMIT_PROGRESS_CALLBACK \
|
||||
-DSQLITE_OMIT_COMPLETE -DSQLITE_OMIT_TCL_VARIABLE -DSQLITE_OMIT_DEPRECATED
|
||||
#
|
||||
# Makefile
|
||||
#
|
||||
# $Id: //poco/1.4/Data/SQLite/Makefile#2 $
|
||||
#
|
||||
# Makefile for Poco SQLite
|
||||
#
|
||||
|
||||
INCLUDE += -Isrc
|
||||
|
||||
objects = Binder Extractor SessionImpl Connector \
|
||||
SQLiteException SQLiteStatementImpl Utility \
|
||||
sqlite3
|
||||
|
||||
target = PocoDataSQLite
|
||||
target_version = $(LIBVERSION)
|
||||
target_libs = PocoData PocoFoundation
|
||||
|
||||
include $(POCO_BASE)/build/rules/lib
|
||||
include $(POCO_BASE)/build/rules/global
|
||||
|
||||
SYSFLAGS += -DSQLITE_THREADSAFE=1 -DSQLITE_DISABLE_LFS \
|
||||
-DSQLITE_OMIT_UTF16 -DSQLITE_OMIT_PROGRESS_CALLBACK -DSQLITE_OMIT_COMPLETE \
|
||||
-DSQLITE_OMIT_TCL_VARIABLE -DSQLITE_OMIT_DEPRECATED
|
||||
|
||||
objects = Binder Extractor SessionImpl Connector \
|
||||
SQLiteException SQLiteStatementImpl Utility
|
||||
|
||||
sqlite_objects = sqlite3
|
||||
|
||||
ifdef POCO_UNBUNDLED
|
||||
SYSLIBS += -lsqlite3
|
||||
else
|
||||
objects += $(sqlite_objects)
|
||||
endif
|
||||
|
||||
target = PocoDataSQLite
|
||||
target_version = $(LIBVERSION)
|
||||
target_libs = PocoData PocoFoundation
|
||||
|
||||
include $(POCO_BASE)/build/rules/lib
|
||||
|
Reference in New Issue
Block a user