[sqlitecpp] update to 3.3.0 (#31689)

* update to 3.3.0

* merge patchs

* remove ONLY_STATIC_LIBRARY

* install .dll
This commit is contained in:
Mengna Li 2023-05-31 02:40:59 +08:00 committed by GitHub
parent 37804988e7
commit b4ba8298f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 51 additions and 37 deletions

View File

@ -1,16 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 72b1a42..552ff50 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -284,9 +284,9 @@ else (SQLITECPP_INTERNAL_SQLITE)
target_link_libraries(SQLiteCpp PRIVATE ${sqlcipher_LIBRARY})
endif()
else()
- find_package (SQLite3 REQUIRED)
+ find_package (unofficial-sqlite3 CONFIG)
message(STATUS "Link to sqlite3 system library")
- target_link_libraries(SQLiteCpp PUBLIC SQLite::SQLite3)
+ target_link_libraries(SQLiteCpp PRIVATE unofficial::sqlite3::sqlite3)
if(SQLite3_VERSION VERSION_LESS "3.19")
set_target_properties(SQLiteCpp PROPERTIES COMPILE_FLAGS "-DSQLITECPP_HAS_MEM_STRUCT")
endif()

View File

@ -0,0 +1,12 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e5723d0..ecc1ac2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -337,6 +337,7 @@ target_include_directories(SQLiteCpp
include(GNUInstallDirs)
install(TARGETS SQLiteCpp
EXPORT ${PROJECT_NAME}Targets
+ RUNTIME DESTINATION bin
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
COMPONENT libraries)

View File

@ -1,11 +1,28 @@
diff --git a/cmake/SQLiteCppConfig.cmake.in b/cmake/SQLiteCppConfig.cmake.in
index 568922f..01196db 100644
--- a/cmake/SQLiteCppConfig.cmake.in
+++ b/cmake/SQLiteCppConfig.cmake.in
@@ -1,5 +1,5 @@
include(CMakeFindDependencyMacro)
-find_dependency(SQLite3 REQUIRED)
+find_dependency(unofficial-sqlite3 REQUIRED)
if(@UNIX@)
set(THREADS_PREFER_PTHREAD_FLAG @THREADS_PREFER_PTHREAD_FLAG@)
find_dependency(Threads REQUIRED)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index df5693d..e5723d0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -295,9 +295,9 @@ else (SQLITECPP_INTERNAL_SQLITE)
target_link_libraries(SQLiteCpp PRIVATE ${sqlcipher_LIBRARY})
endif()
else()
- find_package (SQLite3 REQUIRED)
+ find_package (unofficial-sqlite3 CONFIG)
message(STATUS "Link to sqlite3 system library")
- target_link_libraries(SQLiteCpp PUBLIC SQLite::SQLite3)
+ target_link_libraries(SQLiteCpp PRIVATE unofficial::sqlite3::sqlite3)
if(SQLite3_VERSION VERSION_LESS "3.19")
set_target_properties(SQLiteCpp PROPERTIES COMPILE_FLAGS "-DSQLITECPP_HAS_MEM_STRUCT")
endif()
diff --git a/cmake/SQLiteCppConfig.cmake.in b/cmake/SQLiteCppConfig.cmake.in
index 2b48df4..d0feda9 100644
--- a/cmake/SQLiteCppConfig.cmake.in
+++ b/cmake/SQLiteCppConfig.cmake.in
@@ -1,6 +1,6 @@
include(CMakeFindDependencyMacro)
if(NOT @SQLITECPP_INTERNAL_SQLITE@)
- find_dependency(SQLite3 REQUIRED)
+ find_dependency(unofficial-sqlite3 REQUIRED)
endif()
if(@UNIX@)
set(THREADS_PREFER_PTHREAD_FLAG @THREADS_PREFER_PTHREAD_FLAG@)

View File

@ -1,13 +1,11 @@
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(OUT_SOURCE_PATH SOURCE_PATH
REPO "SRombauts/SQLiteCpp"
REF 3.2.0
REF ${VERSION}
HEAD_REF master
SHA512 af57c3e82a8804174c52105ecc14ea7a2d4e293ef13b2fc371f2455890ea54683ed76adf4649e561686a6b4c3368676f5edcc54d9f22c4850be3ba32832d3272
SHA512 9702b17c55b1b3bc46a72d5c204b560249e9c1f02647c864fd4ca54011e4b0238638800ee870baa5106512a9568338d3faa9c9f9799d42fbd558d10376e3b73a
PATCHES
0001-unofficial-sqlite3-and-sqlcipher.patch
fix_dependency.patch
add_runtime_destination.patch
)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
@ -28,7 +26,6 @@ vcpkg_cmake_configure(
-DSQLITECPP_RUN_CPPCHECK=OFF
-DSQLITECPP_INTERNAL_SQLITE=OFF
-DSQLITE_ENABLE_COLUMN_METADATA=ON
-DSQLITECPP_INTERNAL_SQLITE=OFF
-DSQLITECPP_USE_STATIC_RUNTIME=OFF # unconditionally off because vcpkg's toolchains already do the right thing
# See https://github.com/SRombauts/SQLiteCpp/blob/e74403264ec7093060f4ed0e84bc9208997c8344/CMakeLists.txt#L40-L46
${USE_STACK_PROTECTION}

View File

@ -1,7 +1,6 @@
{
"name": "sqlitecpp",
"version": "3.2.0",
"port-version": 1,
"version": "3.3.0",
"description": "SQLiteC++ (SQLiteCpp) is a smart and easy to use C++ SQLite3 wrapper.",
"homepage": "https://github.com/SRombauts/SQLiteCpp",
"license": "MIT",

View File

@ -7717,8 +7717,8 @@
"port-version": 3
},
"sqlitecpp": {
"baseline": "3.2.0",
"port-version": 1
"baseline": "3.3.0",
"port-version": 0
},
"sqlpp11": {
"baseline": "0.61",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "b239a7578034b934210ab61e462b789feffe2136",
"version": "3.3.0",
"port-version": 0
},
{
"git-tree": "3e0dea72ad51e6dd229ecb147989143608868369",
"version": "3.2.0",