early-access version 2853

This commit is contained in:
pineappleEA
2022-07-23 03:01:36 +02:00
parent 1f2b5081b5
commit 1f111bb69c
8955 changed files with 418777 additions and 999 deletions

View File

@@ -0,0 +1,31 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 85c1061..684205f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -232,16 +232,17 @@ if (SQLITECPP_INTERNAL_SQLITE)
add_subdirectory(sqlite3)
target_link_libraries(SQLiteCpp PUBLIC sqlite3)
else (SQLITECPP_INTERNAL_SQLITE)
- find_package (SQLite3 REQUIRED)
- message(STATUS "Link to sqlite3 system library")
- target_link_libraries(SQLiteCpp PUBLIC SQLite::SQLite3)
- if(SQLite3_VERSION VERSION_LESS "3.19")
- set_target_properties(SQLiteCpp PROPERTIES COMPILE_FLAGS "-DSQLITECPP_HAS_MEM_STRUCT")
- endif()
+ if(NOT SQLITE_HAS_CODEC)
+ find_package(unofficial-sqlite3 CONFIG)
+ message(STATUS "Link to sqlite3 system library")
+ 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()
+ else()
+ # When using the SQLite codec, we need to link against the sqlcipher lib & include <sqlcipher/sqlite3.h>
+ # So this gets the lib & header, and links/includes everything
- # When using the SQLite codec, we need to link against the sqlcipher lib & include <sqlcipher/sqlite3.h>
- # So this gets the lib & header, and links/includes everything
- if(SQLITE_HAS_CODEC)
# Make PkgConfig optional since Windows doesn't usually have it installed.
find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)

View File

@@ -0,0 +1,11 @@
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)

View File

@@ -0,0 +1,35 @@
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(OUT_SOURCE_PATH SOURCE_PATH
REPO "SRombauts/SQLiteCpp"
REF 3.1.1
HEAD_REF master
SHA512 9030b5249c149db8a5b2fe350f71613e4ee91061765a771640ed3ffa7c24aada4000ba884ef91790fdc0f13dc4519038c1edeba64b85b85ac09c3e955a7988a1
PATCHES
0001-unofficial-sqlite3-and-sqlcipher.patch
fix_dependency.patch
)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
sqlcipher SQLITE_HAS_CODEC
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
${FEATURE_OPTIONS}
-DSQLITECPP_RUN_CPPLINT=OFF
-DSQLITECPP_RUN_CPPCHECK=OFF
-DSQLITECPP_INTERNAL_SQLITE=OFF
-DSQLITE_ENABLE_COLUMN_METADATA=OFF
-DSQLITECPP_INTERNAL_SQLITE=OFF
)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/SQLiteCpp)
vcpkg_copy_pdbs()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)

27
externals/vcpkg/ports/sqlitecpp/vcpkg.json vendored Executable file
View File

@@ -0,0 +1,27 @@
{
"name": "sqlitecpp",
"version-string": "3.1.1",
"port-version": 1,
"description": "SQLiteC++ (SQLiteCpp) is a smart and easy to use C++ SQLite3 wrapper.",
"homepage": "https://github.com/SRombauts/SQLiteCpp",
"default-features": [
"sqlite"
],
"features": {
"sqlcipher": {
"description": "Use the sqlcipher port",
"dependencies": [
{
"name": "sqlcipher",
"default-features": false
}
]
},
"sqlite": {
"description": "Use the (unofficial) sqlite3 port of vcpkg",
"dependencies": [
"sqlite3"
]
}
}
}