Skip to content

Commit

Permalink
Add submodule and do all vcpkg install automatic
Browse files Browse the repository at this point in the history
  • Loading branch information
Stepanov Igor committed Jan 23, 2025
1 parent 35cc77b commit f9f9381
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 29 deletions.
14 changes: 2 additions & 12 deletions .github/workflows/windows-clang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,25 +30,15 @@ jobs:
mingw-w64-clang-x86_64-toolchain
mingw-w64-clang-x86_64-cmake
mingw-w64-clang-x86_64-make
mingw-w64-clang-x86_64-luajit
git
- name: Set up vcpkg
shell: msys2 {0}
run: |
git clone https://github.com/microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.bat
./vcpkg integrate install
cd ..
mingw-w64-clang-x86_64-luajit
- name: Configure project with CMake and vcpkg
shell: msys2 {0}
run: |
export VCPKG_DEFAULT_TRIPLET=x64-mingw-static
export VCPKG_DEFAULT_HOST_TRIPLET=x64-mingw-static
export VCPKG_ROOT=./vcpkg
mkdir build
cd build
cmake -G "MinGW Makefiles" -DVCPKG_TARGET_TRIPLET=x64-mingw-static -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=./vcpkg/scripts/buildsystems/vcpkg.cmake ..
cmake -G "MinGW Makefiles" -DVCPKG_TARGET_TRIPLET=x64-mingw-static -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --config Release
- name: Package for Windows
run: |
Expand Down
9 changes: 0 additions & 9 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,7 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: 'true'

- name: Bootstrap vcpkg
shell: pwsh
run: |
git clone https://github.com/microsoft/vcpkg.git
${{ github.workspace }}/vcpkg/bootstrap-vcpkg.bat
- name: Configure and build project with CMake and vcpkg
env:
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
run: |
cmake --preset default-vs-msvc-windows
cmake --build --preset default-vs-msvc-windows --config Release
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "modules/vcpkg"]
path = modules/vcpkg
url = https://github.com/microsoft/vcpkg
3 changes: 3 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
},
"generator": "Visual Studio 17 2022",
"binaryDir": "${sourceDir}/build",
"environment": {
"VCPKG_ROOT": "${sourceDir}/modules/vcpkg"
},
"cacheVariables": {
"CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
"VOXELENGINE_BUILD_TESTS": "ON"
Expand Down
1 change: 1 addition & 0 deletions modules/vcpkg
Submodule vcpkg added at c7961d
8 changes: 0 additions & 8 deletions vcpkg-configuration.json

This file was deleted.

0 comments on commit f9f9381

Please sign in to comment.