mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-27 12:35:46 +00:00
Add dependency to SQLite3
This will be required by navmeshtool.
This commit is contained in:
parent
d6613d3677
commit
2bace703d5
@ -24,4 +24,5 @@ cmake \
|
||||
-DOPENMW_USE_SYSTEM_MYGUI=OFF \
|
||||
-DOPENMW_USE_SYSTEM_OSG=OFF \
|
||||
-DOPENMW_USE_SYSTEM_BULLET=OFF \
|
||||
-DOPENMW_USE_SYSTEM_SQLITE3=OFF \
|
||||
..
|
||||
|
@ -40,6 +40,7 @@ if [[ $CI_OPENMW_USE_STATIC_DEPS ]]; then
|
||||
-DOPENMW_USE_SYSTEM_MYGUI=OFF
|
||||
-DOPENMW_USE_SYSTEM_OSG=OFF
|
||||
-DOPENMW_USE_SYSTEM_BULLET=OFF
|
||||
-DOPENMW_USE_SYSTEM_SQLITE3=OFF
|
||||
)
|
||||
fi
|
||||
|
||||
|
@ -1018,6 +1018,7 @@ echo
|
||||
echo "Setting up OpenMW build..."
|
||||
add_cmake_opts -DOPENMW_MP_BUILD=on
|
||||
add_cmake_opts -DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}"
|
||||
add_cmake_opts -DOPENMW_USE_SYSTEM_SQLITE3=OFF
|
||||
if [ ! -z $CI ]; then
|
||||
case $STEP in
|
||||
components )
|
||||
|
@ -19,6 +19,7 @@ cmake \
|
||||
-D CMAKE_OSX_DEPLOYMENT_TARGET="10.14" \
|
||||
-D CMAKE_BUILD_TYPE=RELEASE \
|
||||
-D OPENMW_OSX_DEPLOYMENT=TRUE \
|
||||
-D OPENMW_USE_SYSTEM_SQLITE3=OFF \
|
||||
-D BUILD_OPENMW=TRUE \
|
||||
-D BUILD_OPENCS=TRUE \
|
||||
-D BUILD_ESMTOOL=TRUE \
|
||||
|
@ -27,7 +27,7 @@ declare -rA GROUPED_DEPS=(
|
||||
# TODO: add librecastnavigation-dev when debian is ready
|
||||
|
||||
# These dependencies can alternatively be built and linked statically.
|
||||
[openmw-deps-dynamic]="libmygui-dev libopenscenegraph-dev"
|
||||
[openmw-deps-dynamic]="libmygui-dev libopenscenegraph-dev libsqlite3-dev"
|
||||
[coverity]="curl"
|
||||
[clang-tidy]="clang-tidy"
|
||||
|
||||
|
@ -149,6 +149,8 @@ else()
|
||||
endif()
|
||||
option(RECASTNAVIGATION_STATIC "Build recastnavigation static libraries" ${_recastnavigation_static_default})
|
||||
|
||||
option(OPENMW_USE_SYSTEM_SQLITE3 "Use system provided SQLite3 library" ON)
|
||||
|
||||
option(OPENMW_UNITY_BUILD "Use fewer compilation units to speed up compile time" FALSE)
|
||||
option(OPENMW_LTO_BUILD "Build OpenMW with Link-Time Optimization (Needs ~2GB of RAM)" OFF)
|
||||
|
||||
|
20
extern/CMakeLists.txt
vendored
20
extern/CMakeLists.txt
vendored
@ -188,3 +188,23 @@ if(NOT OPENMW_USE_SYSTEM_RECASTNAVIGATION)
|
||||
)
|
||||
FetchContent_MakeAvailableExcludeFromAll(recastnavigation)
|
||||
endif()
|
||||
|
||||
if (NOT OPENMW_USE_SYSTEM_SQLITE3)
|
||||
include(FetchContent)
|
||||
FetchContent_Declare(sqlite3
|
||||
URL https://www.sqlite.org/2021/sqlite-amalgamation-3360000.zip
|
||||
URL_HASH MD5=c5d360c74111bafae1b704721ff18fe6
|
||||
SOURCE_DIR fetched/sqlite3
|
||||
)
|
||||
FetchContent_MakeAvailableExcludeFromAll(sqlite3)
|
||||
|
||||
add_library(sqlite3 STATIC ${sqlite3_SOURCE_DIR}/sqlite3.c)
|
||||
target_include_directories(sqlite3 INTERFACE ${sqlite3_SOURCE_DIR}/)
|
||||
if (UNIX)
|
||||
target_link_libraries(sqlite3 ${CMAKE_DL_LIBS})
|
||||
endif()
|
||||
add_library(SQLite::SQLite3 ALIAS sqlite3)
|
||||
|
||||
set(SQLite3_INCLUDE_DIR ${sqlite3_SOURCE_DIR}/ PARENT_SCOPE)
|
||||
set(SQLite3_LIBRARY sqlite3 PARENT_SCOPE)
|
||||
endif()
|
||||
|
Loading…
x
Reference in New Issue
Block a user