Skip to content

Commit

Permalink
[sqlite3] Add unicode support (microsoft#41753)
Browse files Browse the repository at this point in the history
Co-authored-by: Cheney-Wang <[email protected]>
  • Loading branch information
Poldraunic and Cheney-W authored Oct 31, 2024
1 parent e6cedc7 commit b505fa7
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 1 deletion.
8 changes: 8 additions & 0 deletions ports/sqlite3/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ option(WITH_ZLIB "Build sqlite3 with zlib support" OFF)
option(SQLITE3_SKIP_TOOLS "Disable build sqlite3 executable" OFF)

set(PKGCONFIG_LIBS_PRIVATE "")
set(PKGCONFIG_REQUIRES_PRIVATE "")

add_library(sqlite3 sqlite3.c sqlite3.rc)

Expand Down Expand Up @@ -45,6 +46,13 @@ if (NOT WIN32)
endif()
endif()

if(SQLITE_ENABLE_ICU)
find_package(ICU COMPONENTS uc i18n REQUIRED)
target_link_libraries(sqlite3 PRIVATE ICU::uc ICU::i18n)

string(APPEND PKGCONFIG_REQUIRES_PRIVATE "icu-uc icu-i18n")
endif()

if(NOT SQLITE3_SKIP_TOOLS)
add_executable(sqlite3-bin shell.c)
set_target_properties(sqlite3-bin PROPERTIES
Expand Down
1 change: 1 addition & 0 deletions ports/sqlite3/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
fts5 SQLITE_ENABLE_FTS5
math SQLITE_ENABLE_MATH_FUNCTIONS
zlib WITH_ZLIB
unicode SQLITE_ENABLE_ICU
INVERTED_FEATURES
tool SQLITE3_SKIP_TOOLS
)
Expand Down
1 change: 1 addition & 0 deletions ports/sqlite3/sqlite3-vcpkg-config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@
#define SQLITE_ENABLE_COLUMN_METADATA 1
#cmakedefine SQLITE_OS_UNIX @SQLITE_OS_UNIX@
#cmakedefine SQLITE_ENABLE_DBSTAT_VTAB
#cmakedefine SQLITE_ENABLE_ICU
1 change: 1 addition & 0 deletions ports/sqlite3/sqlite3.pc.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ Description: SQL database engine
Version: @PKGCONFIG_VERSION@
Libs: -L${libdir} -lsqlite3
Libs.private: @PKGCONFIG_LIBS_PRIVATE@
Requires.private: @PKGCONFIG_REQUIRES_PRIVATE@
Cflags: -I${includedir}
7 changes: 7 additions & 0 deletions ports/sqlite3/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "sqlite3",
"version": "3.47.0",
"port-version": 1,
"description": "SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine.",
"homepage": "https://sqlite.org/",
"license": "blessing",
Expand Down Expand Up @@ -70,6 +71,12 @@
"description": "Build sqlite3 executable",
"supports": "!uwp"
},
"unicode": {
"description": "Enable unicode support",
"dependencies": [
"icu"
]
},
"zlib": {
"description": "Build sqlite3 command line tool with zlib support; has no effect on the library itself",
"dependencies": [
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -8598,7 +8598,7 @@
},
"sqlite3": {
"baseline": "3.47.0",
"port-version": 0
"port-version": 1
},
"sqlitecpp": {
"baseline": "3.3.2",
Expand Down
5 changes: 5 additions & 0 deletions versions/s-/sqlite3.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "a28f9bb5f7c9a1b985a6ad77d1f3b22e9a543fcb",
"version": "3.47.0",
"port-version": 1
},
{
"git-tree": "e1627228f6b8f4dd39e51e29b34c7b5ea1c304ba",
"version": "3.47.0",
Expand Down

0 comments on commit b505fa7

Please sign in to comment.