aboutsummaryrefslogtreecommitdiff
path: root/ports/sqlitecpp/0001-unofficial-sqlite3-and-sqlcipher.patch
diff options
context:
space:
mode:
authorSvenPStarFinanz <spa@starfinanz.de>2020-10-30 21:29:32 +0100
committerGitHub <noreply@github.com>2020-10-30 13:29:32 -0700
commitfe78675f817144710dd3f602f90f8f93b9dc2754 (patch)
treefd8045b362c3d3f36baeda27cbcd08e3ffcbdfdb /ports/sqlitecpp/0001-unofficial-sqlite3-and-sqlcipher.patch
parent5d4fb44aca482e593f9d6558699ef7fed119868e (diff)
downloadvcpkg-fe78675f817144710dd3f602f90f8f93b9dc2754.tar.gz
vcpkg-fe78675f817144710dd3f602f90f8f93b9dc2754.zip
[sqlitecpp] Additions for sqlcipher port (#14029)
Diffstat (limited to 'ports/sqlitecpp/0001-unofficial-sqlite3-and-sqlcipher.patch')
-rw-r--r--ports/sqlitecpp/0001-unofficial-sqlite3-and-sqlcipher.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/ports/sqlitecpp/0001-unofficial-sqlite3-and-sqlcipher.patch b/ports/sqlitecpp/0001-unofficial-sqlite3-and-sqlcipher.patch
new file mode 100644
index 000000000..9b3e0e4af
--- /dev/null
+++ b/ports/sqlitecpp/0001-unofficial-sqlite3-and-sqlcipher.patch
@@ -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)