Skip to content

Commit 3ddd1a1

Browse files
committed
Merge branch 'cmake_warnings' into 'master'
Use non deprecated dependency name for sqlite (#8639) Closes #123 and #8639 See merge request OpenMW/openmw!5216
2 parents 70f6810 + afa631a commit 3ddd1a1

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

components/CMakeLists.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,12 @@ endif()
577577

578578
include_directories(${BULLET_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR})
579579

580-
find_package(SQLite3 REQUIRED)
580+
if (OPENMW_USE_SYSTEM_SQLITE3)
581+
find_package(SQLite3 REQUIRED)
582+
if(NOT TARGET SQLite3::SQLite3) # CMake < 4.3
583+
add_library(SQLite3::SQLite3 ALIAS SQLite::SQLite3)
584+
endif()
585+
endif()
581586

582587
add_library(components STATIC ${COMPONENT_FILES})
583588

@@ -621,7 +626,7 @@ target_link_libraries(components
621626
RecastNavigation::Recast
622627

623628
Base64
624-
SQLite::SQLite3
629+
SQLite3::SQLite3
625630
smhasher
626631
${ICU_LIBRARIES}
627632
ZLIB::ZLIB

extern/CMakeLists.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,10 +182,8 @@ if (NOT OPENMW_USE_SYSTEM_SQLITE3)
182182
if (UNIX)
183183
target_link_libraries(sqlite3 ${CMAKE_DL_LIBS})
184184
endif()
185-
add_library(SQLite::SQLite3 ALIAS sqlite3)
186185

187-
set(SQLite3_INCLUDE_DIR ${sqlite3_SOURCE_DIR}/ PARENT_SCOPE)
188-
set(SQLite3_LIBRARY sqlite3 PARENT_SCOPE)
186+
add_library(SQLite3::SQLite3 ALIAS sqlite3)
189187
endif()
190188

191189
add_subdirectory(smhasher)

0 commit comments

Comments
 (0)