Skip to content

Commit

Permalink
[sqlpp11] Fix link sqlite3 error (microsoft#32680)
Browse files Browse the repository at this point in the history
  • Loading branch information
jimwang118 authored Jul 21, 2023
1 parent 589cfb8 commit 2d6f26b
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 2 deletions.
34 changes: 34 additions & 0 deletions ports/sqlpp11/fix_link_sqlite3.patch
Original file line number Diff line number Diff line change
@@ -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)
1 change: 1 addition & 0 deletions ports/sqlpp11/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ vcpkg_from_github(
HEAD_REF master
PATCHES
ddl2cpp_path.patch
fix_link_sqlite3.patch
)

vcpkg_check_features(
Expand Down
2 changes: 1 addition & 1 deletion ports/sqlpp11/vcpkg.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -7798,7 +7798,7 @@
},
"sqlpp11": {
"baseline": "0.61",
"port-version": 2
"port-version": 3
},
"sqlpp11-connector-mysql": {
"baseline": "0.61",
Expand Down
5 changes: 5 additions & 0 deletions versions/s-/sqlpp11.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "f84d46c5d6cac9efc370ba6d4a4d0788281481c5",
"version": "0.61",
"port-version": 3
},
{
"git-tree": "1800c18be7c4fe76b515891d6f7d51525873f264",
"version": "0.61",
Expand Down

0 comments on commit 2d6f26b

Please sign in to comment.