mirror of
https://github.com/decaf-emu/decaf-emu.git
synced 2024-05-13 02:04:56 -04:00
vcpkg: Add as a submodule.
This gives us more stability on builds.
This commit is contained in:
parent
f0276954be
commit
6988f975fa
13
.github/workflows/ccpp.yml
vendored
13
.github/workflows/ccpp.yml
vendored
|
@ -27,7 +27,7 @@ jobs:
|
|||
env:
|
||||
VCPKG_BINARY_SOURCES: 'clear;nuget,GitHub,readwrite'
|
||||
VCPKG_BUILD_TYPE: 'release'
|
||||
VCPKG_ROOT: '${{github.workspace}}/build/vcpkg'
|
||||
VCPKG_ROOT: '${{github.workspace}}/libraries/vcpkg'
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
@ -37,21 +37,16 @@ jobs:
|
|||
- name: Initialise
|
||||
run: mkdir build
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
repository: 'microsoft/vcpkg'
|
||||
path: 'build/vcpkg'
|
||||
|
||||
- name: 'Setup vcpkg (Windows)'
|
||||
if: startsWith(matrix.os, 'windows')
|
||||
run: ./build/vcpkg/bootstrap-vcpkg.bat
|
||||
run: ./libraries/vcpkg/bootstrap-vcpkg.bat
|
||||
|
||||
- name: 'Setup NuGet Credentials'
|
||||
if: startsWith(matrix.os, 'windows')
|
||||
shell: 'bash'
|
||||
run: >
|
||||
cd build &&
|
||||
${{ matrix.mono }} `./vcpkg/vcpkg fetch nuget | tail -n 1`
|
||||
${{ matrix.mono }} `../libraries/vcpkg/vcpkg fetch nuget | tail -n 1`
|
||||
sources add
|
||||
-source "https://nuget.pkg.github.com/decaf-emu/index.json"
|
||||
-storepasswordincleartext
|
||||
|
@ -156,7 +151,7 @@ jobs:
|
|||
shell: cmd
|
||||
run: |
|
||||
cd build
|
||||
cmake -DCMAKE_TOOLCHAIN_FILE=./vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-release -DVCPKG_HOST_TRIPLET=x64-windows-release -DCMAKE_BUILD_TYPE=Release -DDECAF_BUILD_TOOLS=ON -DDECAF_VULKAN=ON -DDECAF_QT=ON -DCMAKE_PREFIX_PATH=%QTDIR% -DCMAKE_INSTALL_PREFIX=install ..
|
||||
cmake -DCMAKE_TOOLCHAIN_FILE=../libraries/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-release -DVCPKG_HOST_TRIPLET=x64-windows-release -DCMAKE_BUILD_TYPE=Release -DDECAF_BUILD_TOOLS=ON -DDECAF_VULKAN=ON -DDECAF_QT=ON -DCMAKE_PREFIX_PATH=%QTDIR% -DCMAKE_INSTALL_PREFIX=install ..
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
|
|
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -46,3 +46,6 @@
|
|||
[submodule "libraries/tomlplusplus"]
|
||||
path = libraries/tomlplusplus
|
||||
url = https://github.com/marzer/tomlplusplus.git
|
||||
[submodule "libraries/vcpkg"]
|
||||
path = libraries/vcpkg
|
||||
url = https://github.com/microsoft/vcpkg.git
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
Required:
|
||||
- [Visual Studio 2019](https://visualstudio.microsoft.com/vs/community/)
|
||||
- [CMake](https://cmake.org/)
|
||||
- [vcpkg](https://vcpkg.io/en/getting-started.html)
|
||||
- [Vulkan SDK](https://vulkan.lunarg.com/sdk/home)
|
||||
|
||||
Optional:
|
||||
|
@ -28,7 +27,7 @@ Use cmake-gui to generate a VS project file:
|
|||
- Ensure `Specify the generator for this project` is set to a version of Visual Studio installed on your computer
|
||||
- Select `Specify toolchain for cross-compiling`
|
||||
- Click `Next`
|
||||
- Set `Specify the toolchain file` to `[path to vcpkg]/scripts/buildsystems/vcpkg.cmake`
|
||||
- Set `Specify the toolchain file` to `[path to decaf-emu.git]/libraries/scripts/buildsystems/vcpkg.cmake`
|
||||
- Click `Finish`
|
||||
- Configure will run, which may take a while as vcpkg acquires the dependencies, if all works the console should say `Configuring done`
|
||||
- Click `Generate`, if all works the console should say `Generating done`
|
||||
|
|
21
CMakePresets.json
Normal file
21
CMakePresets.json
Normal file
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"version": 3,
|
||||
"cmakeMinimumRequired": {
|
||||
"major": 3,
|
||||
"minor": 21,
|
||||
"patch": 0
|
||||
},
|
||||
"configurePresets": [
|
||||
{
|
||||
"name": "vcpkg",
|
||||
"displayName": "vcpkg build",
|
||||
"description": "Use vcpkg for dependencies",
|
||||
"toolchainFile": "${sourceDir}/libraries/vcpkg/scripts/buildsystems/vcpkg.cmake",
|
||||
"condition": {
|
||||
"type": "equals",
|
||||
"lhs": "${hostSystemName}",
|
||||
"rhs": "Windows"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
1
libraries/vcpkg
Submodule
1
libraries/vcpkg
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit df40d1c476dc02d71b113e4a63c3a32b00ebb5bd
|
Loading…
Reference in a new issue