From 881dcf0dbf29db082e3023dce9087dbf9d4a56ba Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Wed, 1 Dec 2021 15:59:05 +0800 Subject: [PATCH] integrate SQLite --- deps/CMakeLists.txt | 4 ++-- deps/test/CMakeLists.txt | 4 ++++ deps/test/sqlite/CMakeLists.txt | 6 ++++++ deps/test/sqlite/sqliteTest.c | 6 ++++++ 4 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 deps/test/sqlite/CMakeLists.txt create mode 100644 deps/test/sqlite/sqliteTest.c diff --git a/deps/CMakeLists.txt b/deps/CMakeLists.txt index 00a6791b33..08b1f113c1 100644 --- a/deps/CMakeLists.txt +++ b/deps/CMakeLists.txt @@ -92,8 +92,8 @@ endif(${BUILD_WITH_BDB}) # SQLite if(${BUILD_WITH_SQLITE}) add_library(sqlite STATIC IMPORTED) - set_target_properties(bdb PROPERTIES - IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/sqlite/.lib/libsqlite3.a" + set_target_properties(sqlite PROPERTIES + IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/sqlite/.libs/libsqlite3.a" INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/sqlite" ) endif(${BUILD_WITH_SQLITE}) diff --git a/deps/test/CMakeLists.txt b/deps/test/CMakeLists.txt index 686362c37e..0a333f604c 100644 --- a/deps/test/CMakeLists.txt +++ b/deps/test/CMakeLists.txt @@ -11,4 +11,8 @@ if(${BUILD_WITH_BDB}) add_subdirectory(bdb) endif(${BUILD_WITH_BDB}) +if(${BUILD_WITH_SQLITE}) + add_subdirectory(sqlite) +endif(${BUILD_WITH_SQLITE}) + add_subdirectory(tdev) diff --git a/deps/test/sqlite/CMakeLists.txt b/deps/test/sqlite/CMakeLists.txt new file mode 100644 index 0000000000..b679dd82d9 --- /dev/null +++ b/deps/test/sqlite/CMakeLists.txt @@ -0,0 +1,6 @@ +add_executable(sqliteTest "") +target_sources( + sqliteTest PRIVATE + "sqliteTest.c" +) +target_link_libraries(sqliteTest sqlite) \ No newline at end of file diff --git a/deps/test/sqlite/sqliteTest.c b/deps/test/sqlite/sqliteTest.c new file mode 100644 index 0000000000..ecc0d99ec8 --- /dev/null +++ b/deps/test/sqlite/sqliteTest.c @@ -0,0 +1,6 @@ +#include + +int main(int argc, char const *argv[]) { + printf("Hello world!\n"); + return 0; +} -- GitLab