Author: rinrab
Date: Thu Mar 19 21:06:44 2026
New Revision: 1932395
Log:
cmake: Use newer sqlite targets due to deprecation.
In cmake 4.3, the standard module to locate the sqlite library, changed names
of its exported targets. I have a lot to say, but I would prefer to stay quite
about that.
Fixed by updating target that we use, with a code to handle older cmake
versions.
* CMakeLists.txt
(sqlite): Use new targets.
Modified:
subversion/trunk/CMakeLists.txt
Modified: subversion/trunk/CMakeLists.txt
==============================================================================
--- subversion/trunk/CMakeLists.txt Thu Mar 19 20:57:55 2026
(r1932394)
+++ subversion/trunk/CMakeLists.txt Thu Mar 19 21:06:44 2026
(r1932395)
@@ -360,7 +360,14 @@ else()
find_package(SQLite3)
if(SQLite3_FOUND)
- add_library(external-sqlite ALIAS SQLite::SQLite3)
+ # Support for CMake < 4.3
+ # In prior versions of cmake, the sqlite targets were exported in the
+ # SQLite namespace, which was then changed to SQLite3.
+ if(NOT TARGET SQLite3::SQLite3)
+ add_library(SQLite3::SQLite3 ALIAS SQLite::SQLite3)
+ endif()
+
+ add_library(external-sqlite ALIAS SQLite3::SQLite3)
else()
find_package(SQLiteAmalgamation REQUIRED)
add_library(external-sqlite ALIAS SQLite::SQLite3Amalgamation)