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})