Skip to content

Commit

Permalink
Merge pull request #195 from chewing/use-vcpkg
Browse files Browse the repository at this point in the history
build: use vcpkg for dependencies
  • Loading branch information
kanru authored Sep 19, 2024
2 parents a6195fc + db1825f commit e8af6b9
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ jobs:
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2

- name: Setup vcpkg
run: |
echo VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT >> $env:GITHUB_ENV
echo CMAKE_TOOLCHAIN_FILE=$env:VCPKG_INSTALLATION_ROOT\scripts\buildsystems\vcpkg.cmake >> $env:GITHUB_ENV
& $env:VCPKG_INSTALLATION_ROOT\vcpkg install --triplet x86-windows-static sqlite3
& $env:VCPKG_INSTALLATION_ROOT\vcpkg install --triplet x64-windows-static sqlite3
- name: Build
run: scripts/build_installer.bat

Expand Down
2 changes: 1 addition & 1 deletion libchewing
4 changes: 2 additions & 2 deletions scripts/build_installer.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake -B build\x86 -A Win32 -DBUILD_TESTING=OFF
cmake -B build\x86 -A Win32 -DBUILD_TESTING=OFF -DVCPKG_TARGET_TRIPLET=x86-windows-static
cmake --build build\x86 --config Release
cmake -B build\x64 -A x64 -DBUILD_TESTING=OFF
cmake -B build\x64 -A x64 -DBUILD_TESTING=OFF -DVCPKG_TARGET_TRIPLET=x64-windows-static
cmake --build build\x64 --config Release
pushd tsfreg
cargo build --release
Expand Down
4 changes: 2 additions & 2 deletions scripts/build_installer_debug.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake -B build\x86 -A Win32 -DBUILD_TESTING=OFF
cmake -B build\x86 -A Win32 -DBUILD_TESTING=OFF -DVCPKG_TARGET_TRIPLET=x86-windows-static
cmake --build build\x86 --config Debug
cmake -B build\x64 -A x64 -DBUILD_TESTING=OFF
cmake -B build\x64 -A x64 -DBUILD_TESTING=OFF -DVCPKG_TARGET_TRIPLET=x64-windows-static
cmake --build build\x64 --config Debug
pushd tsfreg
cargo build --release
Expand Down

0 comments on commit e8af6b9

Please sign in to comment.