[sqlpp11] Fix link sqlite3 error (#32680)

This commit is contained in:
jim wang 2023-07-21 23:54:29 +08:00 committed by GitHub
parent 589cfb821d
commit 2d6f26b318
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 42 additions and 2 deletions

View File

@ -0,0 +1,34 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 88a8ae0..a36cb19 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -62,7 +62,7 @@ if(DEPENDENCY_CHECK AND BUILD_POSTGRESQL_CONNECTOR)
endif()
if(DEPENDENCY_CHECK AND BUILD_SQLITE3_CONNECTOR)
- find_package(SQLite3 REQUIRED)
+ find_package(unofficial-sqlite3 CONFIG REQUIRED)
endif()
if(DEPENDENCY_CHECK AND BUILD_SQLCIPHER_CONNECTOR)
@@ -89,7 +89,7 @@ target_compile_features(sqlpp11 INTERFACE cxx_std_11)
if(BUILD_SQLITE3_CONNECTOR)
- add_component(NAME sqlite3 DEPENDENCIES SQLite::SQLite3)
+ add_component(NAME sqlite3 DEPENDENCIES unofficial::sqlite3::sqlite3)
endif()
if(BUILD_SQLCIPHER_CONNECTOR)
diff --git a/cmake/configs/Sqlpp11Config.cmake b/cmake/configs/Sqlpp11Config.cmake
index c25da97..b15524e 100644
--- a/cmake/configs/Sqlpp11Config.cmake
+++ b/cmake/configs/Sqlpp11Config.cmake
@@ -30,6 +30,7 @@ list(PREPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
include(CMakeFindDependencyMacro)
find_dependency(Threads)
find_dependency(date REQUIRED)
+find_dependency(unofficial-sqlite3 CONFIG)
# Work out the set of components to load
if(${CMAKE_FIND_PACKAGE_NAME}_FIND_COMPONENTS)

View File

@ -6,6 +6,7 @@ vcpkg_from_github(
HEAD_REF master
PATCHES
ddl2cpp_path.patch
fix_link_sqlite3.patch
)
vcpkg_check_features(

View File

@ -1,7 +1,7 @@
{
"name": "sqlpp11",
"version": "0.61",
"port-version": 2,
"port-version": 3,
"description": "A type safe embedded domain specific language for SQL queries and results in C++.",
"homepage": "https://github.com/rbock/sqlpp11",
"license": "BSD-2-Clause",

View File

@ -7798,7 +7798,7 @@
},
"sqlpp11": {
"baseline": "0.61",
"port-version": 2
"port-version": 3
},
"sqlpp11-connector-mysql": {
"baseline": "0.61",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "f84d46c5d6cac9efc370ba6d4a4d0788281481c5",
"version": "0.61",
"port-version": 3
},
{
"git-tree": "1800c18be7c4fe76b515891d6f7d51525873f264",
"version": "0.61",