From f08165486f6c2f6ab92d6f55a123885c3024bd26 Mon Sep 17 00:00:00 2001 From: huangxin Date: Tue, 29 Nov 2022 18:17:25 +0800 Subject: [PATCH] =?UTF-8?q?OCT=201.=20=E6=9B=B4=E6=96=B0=E7=BC=96=E8=AF=91?= =?UTF-8?q?=E5=BC=80=E5=85=B3=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- srcs/libs/CMakeLists.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/srcs/libs/CMakeLists.txt b/srcs/libs/CMakeLists.txt index a900f99..42b3c77 100644 --- a/srcs/libs/CMakeLists.txt +++ b/srcs/libs/CMakeLists.txt @@ -22,7 +22,6 @@ AUX_SOURCE_DIRECTORY(mq C_SRC) AUX_SOURCE_DIRECTORY(cmdline C_SRC) AUX_SOURCE_DIRECTORY(crypto C_SRC) AUX_SOURCE_DIRECTORY(hardware C_SRC) -AUX_SOURCE_DIRECTORY(database/sqlite3 C_SRC) if (USED_REDIS) ADD_DEFINITIONS(-DUSED_REDIS) @@ -30,6 +29,7 @@ endif () if (USED_SQLITE) ADD_DEFINITIONS(-DUSED_SQLITE) + AUX_SOURCE_DIRECTORY(database/sqlite3 C_SRC) endif () if (USED_MYSQL) @@ -39,13 +39,15 @@ endif () SET(CMAKE_C_STANDARD 99) SET_SOURCE_FILES_PROPERTIES(misc/zvector.c PROPERTIES COMPILE_FLAGS "-Wall -Wextra -flto") -SET_SOURCE_FILES_PROPERTIES(database/sqlite3/sqlite3.c PROPERTIES - COMPILE_FLAGS "-DSQLITE_HAS_CODEC \ +if (USED_SQLITE) + SET_SOURCE_FILES_PROPERTIES(database/sqlite3/sqlite3.c PROPERTIES + COMPILE_FLAGS "-DSQLITE_HAS_CODEC \ -DSQLCIPHER_CRYPTO_OPENSSL -DSQLITE_OS_UNIX=1 \ -D_HAVE_SQLITE_CONFIG_H -DBUILD_sqlite -DNDEBUG -DSQLITE_THREADSAFE=1 \ -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT \ -DSQLITE_ENABLE_MATH_FUNCTIONS -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT \ -DSQLITE_HAVE_ZLIB=1 -DSQLITE_TEMP_STORE=2") +endif () ADD_DEFINITIONS(-DBUILD_VERSION="${GIT_VERSION}" ${COMMON_DEFINE})