From 3294506a23702b589b44b3ca6da80b9e4cf07088 Mon Sep 17 00:00:00 2001 From: Foe Date: Tue, 19 Nov 2024 23:37:54 +0100 Subject: [PATCH 1/3] Find SQLite library on Windows --- CMakeLists.txt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b71e9c181ba..7dca629277f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -231,9 +231,13 @@ endif() # Win32 delivered packages if(WIN32 AND (BUILD_GAME_SERVER OR BUILD_LOGIN_SERVER OR BUILD_EXTRACTORS)) - set(MYSQL_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/dep/lib/include/mysql") - set(MYSQL_LIBRARY "${CMAKE_SOURCE_DIR}/dep/lib/${DEP_ARCH}_release/libmysql.lib") - set(MYSQL_DEBUG_LIBRARY "${CMAKE_SOURCE_DIR}/dep/lib/${DEP_ARCH}_debug/libmysql.lib") + if(SQLITE) + find_package(SQLite3 REQUIRED) + else() + set(MYSQL_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/dep/lib/include/mysql") + set(MYSQL_LIBRARY "${CMAKE_SOURCE_DIR}/dep/lib/${DEP_ARCH}_release/libmysql.lib") + set(MYSQL_DEBUG_LIBRARY "${CMAKE_SOURCE_DIR}/dep/lib/${DEP_ARCH}_debug/libmysql.lib") + endif() set(OPENSSL_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/dep/lib/include") set(OPENSSL_LIBRARIES "${CMAKE_SOURCE_DIR}/dep/lib/${DEP_ARCH}_release/libcrypto.lib" From 4c8c4986c2a5be4b2f63c500178f550a2230dd2e Mon Sep 17 00:00:00 2001 From: Foe Date: Tue, 19 Nov 2024 23:39:45 +0100 Subject: [PATCH 2/3] Add SQLite option for cmake GUI --- cmake/options.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmake/options.cmake b/cmake/options.cmake index 989f2e820e6..ddb0db9ab0a 100644 --- a/cmake/options.cmake +++ b/cmake/options.cmake @@ -1,6 +1,7 @@ option(DEBUG "Include additional debug-code in core" OFF) option(WARNINGS "Show all warnings during compile" OFF) option(POSTGRESQL "Use PostgreSQL" OFF) +option(SQLITE "Use SQLite" OFF) option(PCH "Use precompiled headers" ON) option(BUILD_GAME_SERVER "Build game server" ON) option(BUILD_LOGIN_SERVER "Build login server" ON) @@ -31,6 +32,7 @@ message(STATUS DEBUG Include additional debug-code in core WARNINGS Show all warnings during compile POSTGRESQL Use PostgreSQL instead of mysql + SQLITE Use SQLite instead of mysql BUILD_GAME_SERVER Build game server (core server) BUILD_LOGIN_SERVER Build login server (auth server) BUILD_EXTRACTORS Build map/dbc/vmap/mmap extractor From a2270b8bba42f586b433d18a8278c25cde67cdcb Mon Sep 17 00:00:00 2001 From: Foe Date: Tue, 19 Nov 2024 23:51:51 +0100 Subject: [PATCH 3/3] Add sqlite documentation to mangosd.conf --- src/mangosd/mangosd.conf.dist.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mangosd/mangosd.conf.dist.in b/src/mangosd/mangosd.conf.dist.in index 3caafddbdd6..4c0985c8857 100644 --- a/src/mangosd/mangosd.conf.dist.in +++ b/src/mangosd/mangosd.conf.dist.in @@ -47,6 +47,8 @@ ConfVersion=2024020101 # ---PGSQL--- # hostname;port;username;password;database # .;/path/to/unix_socket/DIRECTORY or . for default path;username;password;database - use Unix sockets at Unix/Linux +# ---SQLITE--- +# /path/to/sqlite.db # # LoginDatabaseConnections # WorldDatabaseConnections