ci,CMake: Integrate vcpkg into CMakeLists
Uses manifest mode if the bundled vcpkg is used.
This commit is contained in:
parent
4b93ea59db
commit
265d1d6979
|
@ -11,7 +11,6 @@ cmake .. \
|
||||||
-DCMAKE_CXX_COMPILER=/usr/lib/ccache/clang++ \
|
-DCMAKE_CXX_COMPILER=/usr/lib/ccache/clang++ \
|
||||||
-DCMAKE_C_COMPILER=/usr/lib/ccache/clang \
|
-DCMAKE_C_COMPILER=/usr/lib/ccache/clang \
|
||||||
-DCMAKE_INSTALL_PREFIX="/usr" \
|
-DCMAKE_INSTALL_PREFIX="/usr" \
|
||||||
-DCMAKE_TOOLCHAIN_FILE=${VCPKG_TOOLCHAIN_FILE} \
|
|
||||||
-DDISPLAY_VERSION=$1 \
|
-DDISPLAY_VERSION=$1 \
|
||||||
-DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON \
|
-DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON \
|
||||||
-DENABLE_QT_TRANSLATION=ON \
|
-DENABLE_QT_TRANSLATION=ON \
|
||||||
|
|
|
@ -12,7 +12,6 @@ cmake .. \
|
||||||
-DCMAKE_CXX_COMPILER=/usr/lib/ccache/g++ \
|
-DCMAKE_CXX_COMPILER=/usr/lib/ccache/g++ \
|
||||||
-DCMAKE_C_COMPILER=/usr/lib/ccache/gcc \
|
-DCMAKE_C_COMPILER=/usr/lib/ccache/gcc \
|
||||||
-DCMAKE_INSTALL_PREFIX="/usr" \
|
-DCMAKE_INSTALL_PREFIX="/usr" \
|
||||||
-DCMAKE_TOOLCHAIN_FILE=${VCPKG_TOOLCHAIN_FILE} \
|
|
||||||
-DDISPLAY_VERSION=$1 \
|
-DDISPLAY_VERSION=$1 \
|
||||||
-DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON \
|
-DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON \
|
||||||
-DENABLE_QT_TRANSLATION=ON \
|
-DENABLE_QT_TRANSLATION=ON \
|
||||||
|
|
|
@ -6,9 +6,7 @@ parameters:
|
||||||
steps:
|
steps:
|
||||||
- script: choco install vulkan-sdk
|
- script: choco install vulkan-sdk
|
||||||
displayName: 'Install vulkan-sdk'
|
displayName: 'Install vulkan-sdk'
|
||||||
- script: python -m pip install --upgrade pip conan
|
- script: refreshenv && mkdir build && cd build && cmake -G "Visual Studio 17 2022" -A x64 -DYUZU_USE_BUNDLED_QT=1 -DYUZU_USE_BUNDLED_SDL2=1 -DYUZU_USE_QT_WEB_ENGINE=ON -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DYUZU_ENABLE_COMPATIBILITY_REPORTING=${COMPAT} -DYUZU_TESTS=OFF -DUSE_DISCORD_PRESENCE=ON -DENABLE_QT_TRANSLATION=ON -DDISPLAY_VERSION=${{ parameters['version'] }} -DCMAKE_BUILD_TYPE=Release -DYUZU_TESTS=OFF -DYUZU_USE_BUNDLED_VCPKG=ON .. && cd ..
|
||||||
displayName: 'Install conan'
|
|
||||||
- script: refreshenv && mkdir build && cd build && cmake -G "Visual Studio 17 2022" -A x64 -DYUZU_USE_BUNDLED_QT=1 -DYUZU_USE_BUNDLED_SDL2=1 -DYUZU_USE_QT_WEB_ENGINE=ON -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DYUZU_ENABLE_COMPATIBILITY_REPORTING=${COMPAT} -DYUZU_TESTS=OFF -DUSE_DISCORD_PRESENCE=ON -DENABLE_QT_TRANSLATION=ON -DDISPLAY_VERSION=${{ parameters['version'] }} -DCMAKE_BUILD_TYPE=Release .. && cd ..
|
|
||||||
displayName: 'Configure CMake'
|
displayName: 'Configure CMake'
|
||||||
- task: MSBuild@1
|
- task: MSBuild@1
|
||||||
displayName: 'Build'
|
displayName: 'Build'
|
||||||
|
|
|
@ -80,7 +80,6 @@ jobs:
|
||||||
shell: cmd
|
shell: cmd
|
||||||
run: |
|
run: |
|
||||||
choco install vulkan-sdk wget
|
choco install vulkan-sdk wget
|
||||||
python -m pip install --upgrade pip conan
|
|
||||||
call refreshenv
|
call refreshenv
|
||||||
wget https://github.com/mbitsnbites/buildcache/releases/download/v0.27.6/buildcache-windows.zip
|
wget https://github.com/mbitsnbites/buildcache/releases/download/v0.27.6/buildcache-windows.zip
|
||||||
7z x buildcache-windows.zip
|
7z x buildcache-windows.zip
|
||||||
|
@ -100,7 +99,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
glslangValidator --version
|
glslangValidator --version
|
||||||
mkdir build
|
mkdir build
|
||||||
cmake . -B build -GNinja -DCMAKE_TOOLCHAIN_FILE="CMakeModules/MSVCCache.cmake" -DUSE_CCACHE=ON -DYUZU_USE_BUNDLED_QT=1 -DYUZU_USE_BUNDLED_SDL2=1 -DYUZU_USE_QT_WEB_ENGINE=ON -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DYUZU_ENABLE_COMPATIBILITY_REPORTING=ON -DUSE_DISCORD_PRESENCE=ON -DENABLE_QT_TRANSLATION=ON -DCMAKE_BUILD_TYPE=Release
|
cmake . -B build -GNinja -DCMAKE_TOOLCHAIN_FILE="CMakeModules/MSVCCache.cmake" -DUSE_CCACHE=ON -DYUZU_USE_BUNDLED_QT=1 -DYUZU_USE_BUNDLED_SDL2=1 -DYUZU_USE_QT_WEB_ENGINE=ON -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON -DYUZU_ENABLE_COMPATIBILITY_REPORTING=ON -DUSE_DISCORD_PRESENCE=ON -DENABLE_QT_TRANSLATION=ON -DCMAKE_BUILD_TYPE=Release -DYUZU_TESTS=OFF -DYUZU_USE_BUNDLED_VCPKG=ON
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cmake --build build
|
run: cmake --build build
|
||||||
- name: Cache Summary
|
- name: Cache Summary
|
||||||
|
|
|
@ -40,3 +40,6 @@
|
||||||
[submodule "externals/ffmpeg/ffmpeg"]
|
[submodule "externals/ffmpeg/ffmpeg"]
|
||||||
path = externals/ffmpeg/ffmpeg
|
path = externals/ffmpeg/ffmpeg
|
||||||
url = https://git.ffmpeg.org/ffmpeg.git
|
url = https://git.ffmpeg.org/ffmpeg.git
|
||||||
|
[submodule "externals/vcpkg"]
|
||||||
|
path = externals/vcpkg
|
||||||
|
url = https://github.com/Microsoft/vcpkg.git
|
||||||
|
|
|
@ -35,6 +35,16 @@ option(YUZU_USE_BUNDLED_OPUS "Compile bundled opus" ON)
|
||||||
|
|
||||||
option(YUZU_TESTS "Compile tests" ON)
|
option(YUZU_TESTS "Compile tests" ON)
|
||||||
|
|
||||||
|
option(YUZU_USE_BUNDLED_VCPKG "Use vcpkg for yuzu dependencies" OFF)
|
||||||
|
|
||||||
|
if (YUZU_USE_BUNDLED_VCPKG)
|
||||||
|
include(${CMAKE_SOURCE_DIR}/externals/vcpkg/scripts/buildsystems/vcpkg.cmake)
|
||||||
|
elseif(NOT "$ENV{VCPKG_TOOLCHAIN_FILE}" STREQUAL "")
|
||||||
|
# Disable manifest mode (use vcpkg classic mode) when using a custom vcpkg installation
|
||||||
|
option(VCPKG_MANIFEST_MODE "")
|
||||||
|
include("$ENV{VCPKG_TOOLCHAIN_FILE}")
|
||||||
|
endif()
|
||||||
|
|
||||||
# Default to a Release build
|
# Default to a Release build
|
||||||
get_property(IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
|
get_property(IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
|
||||||
if (NOT IS_MULTI_CONFIG AND NOT CMAKE_BUILD_TYPE)
|
if (NOT IS_MULTI_CONFIG AND NOT CMAKE_BUILD_TYPE)
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit cef0b3ec767df6e83806899fe9525f6cf8d7bc91
|
|
@ -0,0 +1,29 @@
|
||||||
|
{
|
||||||
|
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg/master/scripts/vcpkg.schema.json",
|
||||||
|
"name": "yuzu",
|
||||||
|
"version": "1.0",
|
||||||
|
"dependencies": [
|
||||||
|
"boost-algorithm",
|
||||||
|
"boost-asio",
|
||||||
|
"boost-bind",
|
||||||
|
"boost-config",
|
||||||
|
"boost-container",
|
||||||
|
"boost-context",
|
||||||
|
"boost-crc",
|
||||||
|
"boost-functional",
|
||||||
|
"boost-icl",
|
||||||
|
"boost-intrusive",
|
||||||
|
"boost-mpl",
|
||||||
|
"boost-process",
|
||||||
|
"boost-range",
|
||||||
|
"boost-spirit",
|
||||||
|
"boost-test",
|
||||||
|
"boost-timer",
|
||||||
|
"boost-variant",
|
||||||
|
"fmt",
|
||||||
|
"lz4",
|
||||||
|
"nlohmann-json",
|
||||||
|
"zlib",
|
||||||
|
"zstd"
|
||||||
|
]
|
||||||
|
}
|
Reference in New Issue