mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 07:23:54 +00:00
Merge branch 'sqlite3' into 'master'
Add dependency to SQLite3 See merge request OpenMW/openmw!1286
This commit is contained in:
commit
f55f90b36c
7 changed files with 27 additions and 1 deletions
|
@ -24,4 +24,5 @@ cmake \
|
||||||
-DOPENMW_USE_SYSTEM_MYGUI=OFF \
|
-DOPENMW_USE_SYSTEM_MYGUI=OFF \
|
||||||
-DOPENMW_USE_SYSTEM_OSG=OFF \
|
-DOPENMW_USE_SYSTEM_OSG=OFF \
|
||||||
-DOPENMW_USE_SYSTEM_BULLET=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_MYGUI=OFF
|
||||||
-DOPENMW_USE_SYSTEM_OSG=OFF
|
-DOPENMW_USE_SYSTEM_OSG=OFF
|
||||||
-DOPENMW_USE_SYSTEM_BULLET=OFF
|
-DOPENMW_USE_SYSTEM_BULLET=OFF
|
||||||
|
-DOPENMW_USE_SYSTEM_SQLITE3=OFF
|
||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -1018,6 +1018,7 @@ echo
|
||||||
echo "Setting up OpenMW build..."
|
echo "Setting up OpenMW build..."
|
||||||
add_cmake_opts -DOPENMW_MP_BUILD=on
|
add_cmake_opts -DOPENMW_MP_BUILD=on
|
||||||
add_cmake_opts -DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}"
|
add_cmake_opts -DCMAKE_INSTALL_PREFIX="${INSTALL_PREFIX}"
|
||||||
|
add_cmake_opts -DOPENMW_USE_SYSTEM_SQLITE3=OFF
|
||||||
if [ ! -z $CI ]; then
|
if [ ! -z $CI ]; then
|
||||||
case $STEP in
|
case $STEP in
|
||||||
components )
|
components )
|
||||||
|
|
|
@ -19,6 +19,7 @@ cmake \
|
||||||
-D CMAKE_OSX_DEPLOYMENT_TARGET="10.14" \
|
-D CMAKE_OSX_DEPLOYMENT_TARGET="10.14" \
|
||||||
-D CMAKE_BUILD_TYPE=RELEASE \
|
-D CMAKE_BUILD_TYPE=RELEASE \
|
||||||
-D OPENMW_OSX_DEPLOYMENT=TRUE \
|
-D OPENMW_OSX_DEPLOYMENT=TRUE \
|
||||||
|
-D OPENMW_USE_SYSTEM_SQLITE3=OFF \
|
||||||
-D BUILD_OPENMW=TRUE \
|
-D BUILD_OPENMW=TRUE \
|
||||||
-D BUILD_OPENCS=TRUE \
|
-D BUILD_OPENCS=TRUE \
|
||||||
-D BUILD_ESMTOOL=TRUE \
|
-D BUILD_ESMTOOL=TRUE \
|
||||||
|
|
|
@ -27,7 +27,7 @@ declare -rA GROUPED_DEPS=(
|
||||||
# TODO: add librecastnavigation-dev when debian is ready
|
# TODO: add librecastnavigation-dev when debian is ready
|
||||||
|
|
||||||
# These dependencies can alternatively be built and linked statically.
|
# 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"
|
[coverity]="curl"
|
||||||
[clang-tidy]="clang-tidy"
|
[clang-tidy]="clang-tidy"
|
||||||
|
|
||||||
|
|
|
@ -149,6 +149,8 @@ else()
|
||||||
endif()
|
endif()
|
||||||
option(RECASTNAVIGATION_STATIC "Build recastnavigation static libraries" ${_recastnavigation_static_default})
|
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_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)
|
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)
|
FetchContent_MakeAvailableExcludeFromAll(recastnavigation)
|
||||||
endif()
|
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…
Reference in a new issue