Skip to content

Commit df8f35e

Browse files
committed
Switch from vcpkg manifest mode to classic mode and disable manifest mode by default on Windows
Remove vcpkg.json manifest file and update installation scripts to use classic mode with explicit package list. Add CMake configuration to disable manifest mode by default on Windows to ensure compatibility with all vcpkg installations, including standalone packages and Visual Studio which may not have git or baseline support.
1 parent 8e3a2e4 commit df8f35e

File tree

5 files changed

+23
-18
lines changed

5 files changed

+23
-18
lines changed

attachments/CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
cmake_minimum_required (VERSION 3.29)
22

3+
# vcpkg integration
4+
if(WIN32)
5+
# By default, we disable manifest mode to ensure compatibility with all vcpkg installations,
6+
# including those from standalone packages and Visual Studio which may not have git or a baseline.
7+
if(NOT DEFINED VCPKG_MANIFEST_MODE)
8+
set(VCPKG_MANIFEST_MODE OFF CACHE BOOL "Use vcpkg manifest mode")
9+
endif()
10+
endif()
11+
312
project (VulkanTutorial)
413

514
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/CMake")

attachments/simple_engine/CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
cmake_minimum_required(VERSION 3.29)
22

3+
# vcpkg integration
4+
if(WIN32)
5+
# By default, we disable manifest mode to ensure compatibility with all vcpkg installations,
6+
# including those from standalone packages and Visual Studio which may not have git or a baseline.
7+
if(NOT DEFINED VCPKG_MANIFEST_MODE)
8+
set(VCPKG_MANIFEST_MODE OFF CACHE BOOL "Use vcpkg manifest mode")
9+
endif()
10+
endif()
11+
312
project(SimpleEngine VERSION 1.0.0 LANGUAGES CXX C)
413

514
# Option to enable/disable Vulkan C++20 module support for this standalone project

attachments/simple_engine/install_dependencies_windows.bat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ set VCPKG_BINARY_SOURCES=clear;files,%TEMP%\vcpkg-cache,readwrite
2424
:: Create cache directory if it doesn't exist
2525
if not exist %TEMP%\vcpkg-cache mkdir %TEMP%\vcpkg-cache
2626

27-
:: Install all dependencies at once using vcpkg with parallel installation
27+
:: Install all dependencies at once using vcpkg in classic mode
2828
echo Installing all dependencies...
29-
vcpkg install --triplet=x64-windows --x-manifest-root=%~dp0 --feature-flags=binarycaching,manifests --x-install-root=%VCPKG_INSTALLATION_ROOT%/installed
29+
vcpkg install glfw3 glm tinyobjloader stb tinygltf nlohmann-json ktx[vulkan] openal-soft --triplet=x64-windows
3030

3131
:: Remind about Vulkan SDK
3232
echo.

scripts/install_dependencies_windows.bat

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ set VCPKG_BINARY_SOURCES=clear;files,%TEMP%\vcpkg-cache,readwrite
2121
:: Create cache directory if it doesn't exist
2222
if not exist %TEMP%\vcpkg-cache mkdir %TEMP%\vcpkg-cache
2323

24-
:: Install all dependencies at once using vcpkg with parallel installation
24+
:: Install all dependencies at once using vcpkg in classic mode
2525
echo Installing all dependencies...
26-
vcpkg install --triplet=x64-windows --x-manifest-root=%~dp0\.. --feature-flags=binarycaching,manifests --x-install-root=%VCPKG_INSTALLATION_ROOT%/installed
26+
vcpkg install glfw3 glm tinyobjloader stb tinygltf nlohmann-json ktx[vulkan] openal-soft --triplet=x64-windows
2727

2828
:: Remind about Vulkan SDK
2929
echo.
@@ -34,7 +34,7 @@ echo All dependencies have been installed successfully!
3434
echo You can now use CMake to build your Vulkan project.
3535
echo.
3636
echo Example CMake command:
37-
echo cmake -B build -S . -DCMAKE_TOOLCHAIN_FILE=[path\to\vcpkg]\scripts\buildsystems\vcpkg.cmake
37+
echo cmake -B build -S attachments -DCMAKE_TOOLCHAIN_FILE=[path\to\vcpkg]\scripts\buildsystems\vcpkg.cmake
3838
echo cmake --build build
3939

4040
exit /b 0

scripts/vcpkg.json

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)