Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable icu #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,17 @@ jobs:
with:
node-version: ${{ matrix.node }}
- if: ${{ startsWith(matrix.os, 'windows') }}
run: pip.exe install setuptools
run: |
pip.exe install setuptools
vcpkg install icu:x64-windows
- if: ${{ startsWith(matrix.os, 'macos') }}
run: brew install python-setuptools
run: brew install python-setuptools icu4c
- if: ${{ !startsWith(matrix.os, 'windows') && !startsWith(matrix.os, 'macos') }}
run: python3 -m pip install setuptools
- if: ${{ startsWith(matrix.os, 'ubuntu') }}
run: |
sudo apt update
sudo apt install gcc-10 g++-10 -y
sudo apt install gcc-10 g++-10 libicu-dev -y
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10 --slave /usr/bin/gcov gcov /usr/bin/gcov-10
- run: npm install --ignore-scripts
- run: npm run build-debug
Expand Down
52 changes: 51 additions & 1 deletion deps/common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
# ===

{
'variables': { 'sqlite3%': '' },
'variables': {
'sqlite3%': '',
'lib_prefix': '',
'lib_suffix': '',
},
'target_defaults': {
'default_configuration': 'Release',
'msvs_settings': {
Expand All @@ -15,7 +19,23 @@
'conditions': [
['OS == "win"', {
'defines': ['WIN32'],
}, {
'libraries': [
'-licui18n',
'-licuuc',
'-licudata',
],
}],
['OS == "mac"', {
'include_dirs': [
'/usr/local/opt/icu4c/include',
'/opt/homebrew/opt/icu4c/include'
],
'library_dirs': [
'/usr/local/opt/icu4c/lib',
'/opt/homebrew/opt/icu4c/lib'
],
}]
],
'configurations': {
'Debug': {
Expand All @@ -41,6 +61,19 @@
'msvs_settings': {
'VCLinkerTool': {
'GenerateDebugInformation': 'true',
'AdditionalDependencies': [
'icuin.lib',
'icuuc.lib',
'icudt.lib',
],
'AdditionalLibraryDirectories': [
'$(VCPKG_ROOT)/installed/x64-windows/lib',
],
},
'VCCLCompilerTool': {
'AdditionalIncludeDirectories': [
'$(VCPKG_ROOT)/installed/x64-windows/include',
],
},
},
},
Expand All @@ -62,6 +95,23 @@
'DEAD_CODE_STRIPPING': 'YES',
'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
},
'msvs_settings': {
'VCLinkerTool': {
'AdditionalDependencies': [
'icuin.lib',
'icuuc.lib',
'icudt.lib',
],
'AdditionalLibraryDirectories': [
'$(VCPKG_ROOT)/installed/x64-windows/lib',
],
},
'VCCLCompilerTool': {
'AdditionalIncludeDirectories': [
'$(VCPKG_ROOT)/installed/x64-windows/include',
],
},
},
},
},
},
Expand Down
1 change: 1 addition & 0 deletions deps/defines.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,6 @@
'SQLITE_TRACE_SIZE_LIMIT=32',
'SQLITE_USE_URI=0',
'SQLITE_OMIT_LOAD_EXTENSION',
'SQLITE_ENABLE_ICU',
],
}
1 change: 1 addition & 0 deletions deps/download.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ SQLITE_THREADSAFE=2
SQLITE_TRACE_SIZE_LIMIT=32
SQLITE_USE_URI=0
SQLITE_OMIT_LOAD_EXTENSION
SQLITE_ENABLE_ICU
"

# ========== START SCRIPT ========== #
Expand Down
1 change: 1 addition & 0 deletions docs/compilation.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,5 @@ SQLITE_THREADSAFE=2
SQLITE_TRACE_SIZE_LIMIT=32
SQLITE_USE_URI=0
SQLITE_OMIT_LOAD_EXTENSION
SQLITE_ENABLE_ICU
```